Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-dev: Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: "Stig Bjørlykke" <stig@xxxxxxxxxxxxx>
Date: Thu, 6 Mar 2008 10:29:54 +0100

Hi,

If you read the warnings you will see what is wrong:

   packet-xxx.c(1077) : warning C4244: '=' : conversion from 'time_t'
to 'unsigned int', possible loss of data

This warning tells you that you are trying to convert a time_t to an
unsigned int, which may lead to loss of data.  In Wireshark
nstime_t.secs is defined as time_t, not unsigned int.

You can fix this in one of two ways:

1. Use correct data types for hours, mins and secs:
  time_t hours;
  time_t mins;
  time_t secs;

2. Add a cast in the assignment:
  hours = (unsigned int)(tagv.secs / 3600);
  mins = (unsigned int)((tagv.secs - (hours * 3600)) / 60);
  secs = (unsigned int)(tagv.secs - (hours * 3600) - (mins * 60));


-- 
Stig Bjørlykke

  • Follow-Ups:
    • Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7
      • From: A Verma
  • References:
    • Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7
      • From: A Verma
    • Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7
      • From: Maynard, Chris
    • Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7
      • From: A Verma
    • Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7
      • From: Stephen Fisher
    • Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7
      • From: A Verma
  • Prev by Date: Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7
  • Next by Date: Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7
  • Previous by thread: Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7
  • Next by thread: Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation