forked from osmocom/wireshark
Enable -Wredundant-decls.
Add it to the default list of checks, and fix some errors it causes. (Sadly, it doesn't work in CLang.)pespin/rlcmac
parent
3387eef836
commit
c0711693ab
|
@ -582,6 +582,7 @@ else() # ! MSVC
|
|||
-Wheader-guard
|
||||
-Wcomma
|
||||
-Wshorten-64-to-32
|
||||
-Wredundant-decls
|
||||
)
|
||||
|
||||
#
|
||||
|
@ -675,12 +676,6 @@ else() # ! MSVC
|
|||
#
|
||||
-Wcast-qual
|
||||
#
|
||||
# Some generated ASN.1 dissectors block this one;
|
||||
# multiple function declarations for the same
|
||||
# function are being generated.
|
||||
#
|
||||
-Wredundant-decls
|
||||
#
|
||||
# All the registration functions block these for now.
|
||||
#
|
||||
-Wmissing-prototypes
|
||||
|
|
15
capinfos.c
15
capinfos.c
|
@ -51,8 +51,17 @@
|
|||
#include <locale.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
@ -76,10 +85,6 @@
|
|||
|
||||
#include <wsutil/wsgcrypt.h>
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#endif
|
||||
|
||||
#include "ui/failure_message.h"
|
||||
|
||||
#define INVALID_OPTION 1
|
||||
|
|
15
captype.c
15
captype.c
|
@ -20,8 +20,17 @@
|
|||
#include <locale.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
@ -42,10 +51,6 @@
|
|||
#include <wsutil/report_message.h>
|
||||
#include <wsutil/str_util.h>
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#endif
|
||||
|
||||
#include "ui/failure_message.h"
|
||||
|
||||
static void
|
||||
|
|
15
dumpcap.c
15
dumpcap.c
|
@ -21,8 +21,17 @@
|
|||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) && defined(__LP64__)
|
||||
|
@ -39,10 +48,6 @@
|
|||
|
||||
#include <wsutil/socket.h>
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBCAP
|
||||
# include <sys/prctl.h>
|
||||
# include <sys/capability.h>
|
||||
|
|
15
editcap.c
15
editcap.c
|
@ -40,8 +40,17 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <wiretap/secrets-types.h>
|
||||
|
@ -50,10 +59,6 @@
|
|||
#include "epan/etypes.h"
|
||||
#include "epan/dissectors/packet-ieee80211-radiotap-defs.h"
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <process.h> /* getpid */
|
||||
#include <winsock2.h>
|
||||
|
|
|
@ -19,13 +19,19 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#endif
|
||||
#include "ws_attributes.h"
|
||||
|
||||
enum extcap_options {
|
||||
|
|
|
@ -19,12 +19,17 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
15
mergecap.c
15
mergecap.c
|
@ -18,18 +18,23 @@
|
|||
#include <errno.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <wiretap/wtap.h>
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <ui/clopts_common.h>
|
||||
#include <ui/cmdarg_err.h>
|
||||
#include <wsutil/filesystem.h>
|
||||
|
|
|
@ -229,9 +229,6 @@ static const range_string pn_rsi_interface[] = {
|
|||
{ 0, NULL }
|
||||
};*/
|
||||
|
||||
int dissect_blocks(tvbuff_t *tvb, int offset,
|
||||
packet_info *pinfo, proto_tree *tree, guint8 *drep);
|
||||
|
||||
static int
|
||||
dissect_FOpnumOffset(tvbuff_t *tvb, int offset,
|
||||
packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, guint32 *u32FOpnumOffset)
|
||||
|
|
16
randpkt.c
16
randpkt.c
|
@ -27,12 +27,18 @@
|
|||
#endif
|
||||
|
||||
#include <wsutil/report_message.h>
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include "randpkt_core/randpkt_core.h"
|
||||
|
|
17
rawshark.c
17
rawshark.c
|
@ -33,14 +33,19 @@
|
|||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
|
15
reordercap.c
15
reordercap.c
|
@ -15,16 +15,21 @@
|
|||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <wiretap/wtap.h>
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#endif
|
||||
|
||||
#include <ui/cmdarg_err.h>
|
||||
#include <wsutil/filesystem.h>
|
||||
#include <wsutil/file_util.h>
|
||||
|
|
15
text2pcap.c
15
text2pcap.c
|
@ -112,17 +112,22 @@
|
|||
#include <time.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRPTIME
|
||||
# include "wsutil/strptime.h"
|
||||
#endif
|
||||
|
|
15
tfshark.c
15
tfshark.c
|
@ -17,16 +17,21 @@
|
|||
#include <locale.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <epan/exceptions.h>
|
||||
|
|
|
@ -48,7 +48,7 @@ extern int access(const char *path, int mode);
|
|||
#define MAXRHS 1000
|
||||
#endif
|
||||
|
||||
extern void memory_error();
|
||||
extern void memory_error(void);
|
||||
static int showPrecedenceConflict = 0;
|
||||
static char *msort(char*,char**,int(*)(const char*,const char*));
|
||||
|
||||
|
@ -430,7 +430,6 @@ struct lemon {
|
|||
};
|
||||
|
||||
#define MemoryCheck(X) if((X)==0){ \
|
||||
extern void memory_error(); \
|
||||
memory_error(); \
|
||||
}
|
||||
|
||||
|
|
15
tshark.c
15
tshark.c
|
@ -18,8 +18,17 @@
|
|||
#include <locale.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -32,10 +41,6 @@
|
|||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <epan/exceptions.h>
|
||||
|
|
|
@ -16,12 +16,17 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <version_info.h>
|
||||
|
|
|
@ -21,12 +21,17 @@
|
|||
#include "ui/win32/console_win32.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
/*
|
||||
* If we have getopt_long() in the system library, include <getopt.h>.
|
||||
* Otherwise, we're using our own getopt_long() (either because the
|
||||
* system has getopt() but not getopt_long(), as with some UN*Xes,
|
||||
* or because it doesn't even have getopt(), as with Windows), so
|
||||
* include our getopt_long()'s header.
|
||||
*/
|
||||
#ifdef HAVE_GETOPT_LONG
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
#include "wsutil/wsgetopt.h"
|
||||
#else
|
||||
#include <wsutil/wsgetopt.h>
|
||||
#endif
|
||||
|
||||
#include <ui/clopts_common.h>
|
||||
|
|
Loading…
Reference in New Issue