forked from osmocom/wireshark
set compiler option "treat warnings as errors" - to prevent new warnings for wiretap
remove all compiler warnings: a) prevent wrong malloc/free definitions by lex/yacc generated files b) add int/time_t casts - MSVC2005 is more "sensitive" about this than MSVC6 svn path=/trunk/; revision=21078
This commit is contained in:
parent
16f4a91dfc
commit
77ec324774
|
@ -9,7 +9,7 @@ include <win32.mak>
|
|||
|
||||
include Makefile.common
|
||||
|
||||
CFLAGS=-DHAVE_CONFIG_H $(GLIB_CFLAGS) $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include \
|
||||
CFLAGS=-WX -DYYMALLOC=malloc -DYYFREE=free -DHAVE_CONFIG_H $(GLIB_CFLAGS) $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include \
|
||||
-D_U_="" $(LOCAL_CFLAGS) -DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED)
|
||||
|
||||
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
|
||||
|
|
|
@ -360,7 +360,7 @@ wdd_date: WDD_DATE decnum decnum decnum KEYWORD decnum decnum decnum KEYWORD str
|
|||
wddt.tm_year = ($4 > 1970) ? $4 - 1900 : 70;
|
||||
wddt.tm_isdst = -1;
|
||||
|
||||
start_time = mktime(&wddt);
|
||||
start_time = (guint32) mktime(&wddt);
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
typedef struct {
|
||||
time_t start_time;
|
||||
time_t secs;
|
||||
time_t usecs;
|
||||
int usecs;
|
||||
guint32 caplen;
|
||||
guint32 len;
|
||||
} ascend_pkthdr;
|
||||
|
|
|
@ -208,7 +208,7 @@ static gint get_record(guint8** bufferp, FILE* fh, gint64 file_offset) {
|
|||
guint8* writep;
|
||||
|
||||
/* where the next unknown 0x10 bytes are stuffed to the file */
|
||||
gint64 junky_offset = 0x2000 - ( (file_offset - 0x200) % 0x2000 );
|
||||
gint junky_offset = 0x2000 - (gint) ( (file_offset - 0x200) % 0x2000 );
|
||||
|
||||
K12_DBG(6,("get_record: ENTER: junky_offset=%lld, file_offset=%lld",junky_offset,file_offset));
|
||||
|
||||
|
|
|
@ -576,7 +576,7 @@ static gboolean lanalyzer_dump(wtap_dumper *wdh,
|
|||
if (*err)
|
||||
return FALSE;
|
||||
|
||||
tv.tv_sec = phdr->ts.secs;
|
||||
tv.tv_sec = (long int) phdr->ts.secs;
|
||||
tv.tv_usec = phdr->ts.nsecs / 1000;
|
||||
|
||||
if (!itmp->init) {
|
||||
|
@ -714,7 +714,7 @@ gboolean lanalyzer_dump_open(wtap_dumper *wdh, gboolean cant_seek, int *err)
|
|||
static gboolean lanalyzer_dump_header(wtap_dumper *wdh, int *err)
|
||||
{
|
||||
LA_TmpInfo *itmp = (LA_TmpInfo*)(wdh->dump.opaque);
|
||||
struct tm *fT = localtime(&(itmp->start.tv_sec));
|
||||
struct tm *fT = localtime( (time_t *) &(itmp->start.tv_sec));
|
||||
guint16 board_type = itmp->encap == WTAP_ENCAP_TOKEN_RING
|
||||
? BOARD_325TR /* LANalyzer Board Type */
|
||||
: BOARD_325; /* LANalyzer Board Type */
|
||||
|
|
|
@ -2297,7 +2297,7 @@ static gboolean libpcap_dump(wtap_dumper *wdh,
|
|||
break;
|
||||
}
|
||||
|
||||
rec_hdr.hdr.ts_sec = phdr->ts.secs;
|
||||
rec_hdr.hdr.ts_sec = (guint32) phdr->ts.secs;
|
||||
if(wdh->tsprecision == WTAP_FILE_TSPREC_NSEC) {
|
||||
rec_hdr.hdr.ts_usec = phdr->ts.nsecs;
|
||||
} else {
|
||||
|
|
|
@ -490,7 +490,7 @@ static gboolean visual_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
|
|||
if (visual->index_table_index == 0)
|
||||
{
|
||||
/* This is the first packet. Save its start time as the file time. */
|
||||
visual->start_time = phdr->ts.secs;
|
||||
visual->start_time = (guint32) phdr->ts.secs;
|
||||
|
||||
/* Initialize the index table */
|
||||
visual->index_table = g_malloc(1024 * sizeof *visual->index_table);
|
||||
|
@ -499,7 +499,7 @@ static gboolean visual_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
|
|||
|
||||
/* Calculate milliseconds since capture start. */
|
||||
delta_msec = phdr->ts.nsecs / 1000000;
|
||||
delta_msec += (phdr->ts.secs - visual->start_time) * 1000;
|
||||
delta_msec += ( (guint32) phdr->ts.secs - visual->start_time) * 1000;
|
||||
vpkt_hdr.ts_delta = htolel(delta_msec);
|
||||
|
||||
/* Fill in the length fields. */
|
||||
|
|
Loading…
Reference in New Issue