Fix all fixable warnings

Move addional warnings from extra-gcc-checks to normal compilation flags

svn path=/trunk/; revision=9826
This commit is contained in:
Jörg Mayer 2004-01-24 16:48:12 +00:00
parent 65f18bb833
commit 6e59f95ceb
7 changed files with 27 additions and 26 deletions

View File

@ -1,4 +1,4 @@
# $Id: configure.in,v 1.51 2004/01/10 16:51:07 obiot Exp $
# $Id: configure.in,v 1.52 2004/01/24 16:48:12 jmayer Exp $
dnl
dnl Process this file with autoconf 2.13 or later to produce a
dnl configure script; 2.12 doesn't generate a "configure" script that
@ -44,12 +44,12 @@ AC_ARG_WITH(extra-gcc-checks,
[
if test $withval != no
then
ethereal_extra_gcc_flags=" -Wcast-align -Wbad-function-cast -pedantic"
ethereal_extra_gcc_flags=" "
fi
],)
AC_MSG_CHECKING(to see if we can add '-Wall -W -Wcast-qual$ethereal_extra_gcc_flags' to CFLAGS)
if test x$GCC != x ; then
CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W -Wcast-qual$ethereal_extra_gcc_flags $CFLAGS"
CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -W -Wcast-qual -Wcast-align -Wbad-function-cast -pedantic$ethereal_extra_gcc_flags $CFLAGS"
AC_MSG_RESULT(yes)
else
CFLAGS="-D_U_=\"\" $CFLAGS"

View File

@ -1,6 +1,6 @@
/* cosine.c
*
* $Id: cosine.c,v 1.6 2003/11/25 05:58:56 guy Exp $
* $Id: cosine.c,v 1.7 2004/01/24 16:48:12 jmayer Exp $
*
* CoSine IPNOS L2 debug output parsing
* Copyright (c) 2002 by Motonori Shindo <mshindo@mshindo.net>
@ -166,7 +166,7 @@
#define COSINE_MAX_PACKET_LEN 65536
static gboolean empty_line(const guchar *line);
static gboolean empty_line(const gchar *line);
static long cosine_seek_next_packet(wtap *wth, int *err, char *hdr);
static gboolean cosine_check_file_type(wtap *wth, int *err);
static gboolean cosine_read(wtap *wth, int *err, long *data_offset);
@ -182,7 +182,7 @@ static int parse_single_hex_dump_line(char* rec, guint8 *buf,
/* Returns TRUE if the line appears to be an empty line. Otherwise it
returns FALSE. */
static gboolean empty_line(const guchar *line)
static gboolean empty_line(const gchar *line)
{
while (*line) {
if (isspace(*line)) {
@ -368,7 +368,8 @@ parse_cosine_rec_hdr(wtap *wth, const char *line, union wtap_pseudo_header *pseu
{
int num_items_scanned;
int yy, mm, dd, hr, min, sec, csec, pkt_len;
int pro, off, pri, rm, error, code1, code2;
int pro, off, pri, rm, error;
guint code1, code2;
char if_name[COSINE_MAX_IF_NAME_LEN], direction[6];
struct tm tm;
@ -456,7 +457,7 @@ parse_cosine_rec_hdr(wtap *wth, const char *line, union wtap_pseudo_header *pseu
static int
parse_cosine_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err)
{
char line[COSINE_LINE_LENGTH];
gchar line[COSINE_LINE_LENGTH];
int i, hex_lines, n, caplen = 0;
/* Calculate the number of hex dump lines, each

View File

@ -1,6 +1,6 @@
/* dbs-etherwatch.c
*
* $Id: dbs-etherwatch.c,v 1.13 2003/12/31 01:07:09 guy Exp $
* $Id: dbs-etherwatch.c,v 1.14 2004/01/24 16:48:12 jmayer Exp $
*
* Wiretap Library
* Copyright (c) 2001 by Marc Milgram <ethereal@mmilgram.NOSPAMmail.net>
@ -312,8 +312,8 @@ parse_dbs_etherwatch_packet(wtap *wth, FILE_T fh, guint8* buf, int *err)
int length_pos, length_from, length;
struct tm time;
char mon[4];
guchar *p;
static guchar months[] = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
gchar *p;
static gchar months[] = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
int count, line_count;
eth_hdr_len = 0;

View File

@ -1,6 +1,6 @@
/* iptrace.c
*
* $Id: iptrace.c,v 1.48 2003/10/01 07:11:47 guy Exp $
* $Id: iptrace.c,v 1.49 2004/01/24 16:48:12 jmayer Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -126,7 +126,7 @@ static gboolean iptrace_read_1_0(wtap *wth, int *err, long *data_offset)
guint8 header[IPTRACE_1_0_PHDR_SIZE];
guint8 *data_ptr;
iptrace_1_0_phdr pkt_hdr;
char fddi_padding[3];
guchar fddi_padding[3];
/* Read the descriptor data */
*data_offset = wth->data_offset;
@ -213,7 +213,7 @@ static gboolean iptrace_seek_read_1_0(wtap *wth, long seek_off,
int ret;
guint8 header[IPTRACE_1_0_PHDR_SIZE];
int pkt_encap;
char fddi_padding[3];
guchar fddi_padding[3];
if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1)
return FALSE;
@ -304,7 +304,7 @@ static gboolean iptrace_read_2_0(wtap *wth, int *err, long *data_offset)
guint8 header[IPTRACE_2_0_PHDR_SIZE];
guint8 *data_ptr;
iptrace_2_0_phdr pkt_hdr;
char fddi_padding[3];
guchar fddi_padding[3];
/* Read the descriptor data */
*data_offset = wth->data_offset;
@ -395,7 +395,7 @@ static gboolean iptrace_seek_read_2_0(wtap *wth, long seek_off,
int ret;
guint8 header[IPTRACE_2_0_PHDR_SIZE];
int pkt_encap;
char fddi_padding[3];
guchar fddi_padding[3];
if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1)
return FALSE;

View File

@ -1,6 +1,6 @@
/* libpcap.c
*
* $Id: libpcap.c,v 1.106 2004/01/05 17:33:27 ulfl Exp $
* $Id: libpcap.c,v 1.107 2004/01/24 16:48:12 jmayer Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -966,7 +966,7 @@ static gboolean libpcap_read(wtap *wth, int *err, long *data_offset)
guint packet_size;
guint orig_size;
int bytes_read;
char fddi_padding[3];
guchar fddi_padding[3];
bytes_read = libpcap_read_header(wth, err, &hdr, FALSE);
if (bytes_read == -1) {

View File

@ -1,6 +1,6 @@
/* radcom.c
*
* $Id: radcom.c,v 1.42 2003/10/01 07:11:48 guy Exp $
* $Id: radcom.c,v 1.43 2004/01/24 16:48:12 jmayer Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -272,7 +272,7 @@ static gboolean radcom_read(wtap *wth, int *err, long *data_offset)
guint32 sec;
int bytes_read;
struct tm tm;
char phdr[8];
guchar phdr[8];
char fcs[2];
/* Read record header. */
@ -376,7 +376,7 @@ radcom_seek_read(wtap *wth, long seek_off,
{
int ret;
struct radcomrec_hdr hdr;
char phdr[8];
guchar phdr[8];
if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1)
return FALSE;

View File

@ -1,6 +1,6 @@
/* vms.c
*
* $Id: vms.c,v 1.19 2003/05/27 10:14:06 guy Exp $
* $Id: vms.c,v 1.20 2004/01/24 16:48:12 jmayer Exp $
*
* Wiretap Library
* Copyright (c) 2001 by Marc Milgram <ethereal@mmilgram.NOSPAMmail.net>
@ -334,7 +334,7 @@ vms_seek_read (wtap *wth, long seek_off,
* by 3 spaces.
*/
static int
isdumpline( guchar *line )
isdumpline( gchar *line )
{
int i, j;
@ -365,8 +365,8 @@ parse_vms_rec_hdr(wtap *wth, FILE_T fh, int *err)
int csec = 101;
struct tm time;
char mon[4] = {'J', 'A', 'N', 0};
guchar *p;
static guchar months[] = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
gchar *p;
static gchar months[] = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
time.tm_year = 1970;
time.tm_hour = 1;
@ -446,7 +446,7 @@ parse_vms_rec_hdr(wtap *wth, FILE_T fh, int *err)
static gboolean
parse_vms_hex_dump(FILE_T fh, int pkt_len, guint8* buf, int *err)
{
guchar line[VMS_LINE_LENGTH + 1];
gchar line[VMS_LINE_LENGTH + 1];
int i;
int offset = 0;