Fix ISO C forbids an empty translation unit [-Wpedantic] (airpcap)

Autotools only warning.

Change-Id: I30f33d2f8611d662dbc62326862707bf05ad3f60
Reviewed-on: https://code.wireshark.org/review/12150
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
João Valverde 2015-11-25 00:45:06 +00:00 committed by Alexis La Goutte
parent d7f1243670
commit 7c8314a683
10 changed files with 36 additions and 67 deletions

View File

@ -31,6 +31,10 @@ noinst_LIBRARIES = libcaputils.a
PLATFORM_CAPUTILS_SRC = \
capture-pcap-util-unix.c
CAPUTILS_SRC = \
$(COMMON_CAPUTILS_SRC) \
$(PLATFORM_CAPUTILS_SRC)
CLEANFILES = \
doxygen-caputils.tag \
libcaputils.a \
@ -40,6 +44,22 @@ MAINTAINERCLEANFILES = \
$(GENERATED_FILES) \
Makefile.in
EXTRA_DIST = \
$(GENERATOR_FILES) \
airpcap.h \
airpcap_loader.c \
airpcap_loader.h \
capture_win_ifnames.c \
capture_win_ifnames.h \
capture-wpcap.c \
capture-wpcap.h \
capture_wpcap_packet.c \
capture_wpcap_packet.h \
CMakeLists.txt \
doxygen.cfg.in \
Makefile.common \
Makefile.nmake
# All sources that should be put in the source distribution tarball
libcaputils_a_SOURCES = \
$(CAPUTILS_SRC) \
@ -80,16 +100,3 @@ checkapi-todo:
$(PERL) $(top_srcdir)/tools/checkAPIs.pl -M -g deprecated-gtk-todo -build \
-sourcedir=$(srcdir) \
$(CAPUTILS_SRC)
EXTRA_DIST = \
$(GENERATOR_FILES) \
capture_win_ifnames.c \
capture_win_ifnames.h \
capture-wpcap.c \
capture-wpcap.h \
capture_wpcap_packet.c \
capture_wpcap_packet.h \
CMakeLists.txt \
doxygen.cfg.in \
Makefile.common \
Makefile.nmake

View File

@ -21,16 +21,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
CAPUTILS_SRC = \
$(PLATFORM_CAPUTILS_SRC) \
airpcap_loader.c \
COMMON_CAPUTILS_SRC = \
capture-pcap-util.c \
iface_monitor.c \
ws80211_utils.c
noinst_HEADERS = \
airpcap.h \
airpcap_loader.h \
capture_ifinfo.h \
capture-pcap-util.h \
capture-pcap-util-int.h \

View File

@ -4,6 +4,7 @@
include ..\config.nmake
include ..\Makefile.nmake.inc
include Makefile.common
############### no need to modify below this line #########
@ -28,8 +29,10 @@ PLATFORM_CAPUTILS_SRC = \
capture-wpcap.c \
capture_wpcap_packet.c
include Makefile.common
CAPUTILS_SRC = \
$(COMMON_CAPUTILS_SRC) \
$(PLATFORM_CAPUTILS_SRC) \
airpcap_loader.c
# if you add files here, be sure to include them also in Makefile.am EXTRA_DIST
CAPUTILS_OBJECTS = \

View File

@ -24,8 +24,6 @@
#include "config.h"
#ifdef HAVE_AIRPCAP
#ifdef HAVE_LIBPCAP
#include <glib.h>
#include <gmodule.h>
@ -1244,7 +1242,6 @@ get_runtime_airpcap_version(GString *str)
g_string_append_printf(str, "with AirPcap %d.%d.%d build %d", vmaj, vmin,
vrev, build);
}
#endif /* HAVE_AIRPCAP */
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html

View File

@ -694,21 +694,18 @@ linux*)
AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
AC_DEFINE(HAVE_LIBNL3, 1, [libnl version 3])
libnl_message="yes (v3)"
enable_airpcap=no
elif (test "${have_libnl2}" = "yes"); then
CFLAGS="$CFLAGS $LIBNL2_CFLAGS"
LIBS="$LIBS $LIBNL2_LIBS"
AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
AC_DEFINE(HAVE_LIBNL2, 1, [libnl version 2])
libnl_message="yes (v2)"
enable_airpcap=no
elif (test "${have_libnl1}" = "yes"); then
CFLAGS="$CFLAGS $LIBNL1_CFLAGS"
LIBS="$LIBS $LIBNL1_LIBS"
AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
AC_DEFINE(HAVE_LIBNL1, 1, [libnl version 1])
libnl_message="yes (v1)"
enable_airpcap=no
else
if test x$want_libnl = "xyes"; then
case "$libnl_version" in
@ -2221,29 +2218,6 @@ else
AC_WIRESHARK_PCAP_CHECK
fi
dnl Check for airpcap
dnl We might want to remove this entirely unless we want to support
dnl AutoTools on Windows.
AC_MSG_CHECKING(whether to include airpcap support)
AC_ARG_ENABLE(airpcap,
AC_HELP_STRING( [--enable-airpcap],
[use AirPcap in Wireshark @<:@default=no@:>@]),
enable_airpcap=$enableval, enable_airpcap=no)
if test x$enable_airpcap = xyes; then
if test "x$want_pcap" = "xno" ; then
enable_airpcap=no
AC_MSG_RESULT(pcap not available - disabling airpcap)
else
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_AIRPCAP, 1, [Enable AirPcap])
fi
else
AC_MSG_RESULT(no)
fi
dnl dumpcap check
AC_MSG_CHECKING(whether to build dumpcap)

View File

@ -39,19 +39,22 @@ MAINTAINERCLEANFILES = \
Makefile.in
WIRESHARK_CLEAN_LIBGTKUI_SRC = \
$(WIRESHARK_GTK_SRC) \
$(WIRESHARK_TAP_SRC) \
$(WIRESHARK_COMMON_GTK_SRC) \
$(WIRESHARK_TAP_SRC) \
$(GENERATED_C_FILES)
EXTRA_DIST = \
$(GENERATOR_FILES) \
airpcap_dlg.c \
airpcap_dlg.h \
airpcap_gui_utils.c \
airpcap_gui_utils.h \
capture_if_details_dlg_win32.c \
capture_if_details_dlg_win32.h \
CMakeLists.txt \
doxygen.cfg.in \
main_airpcap_toolbar.c \
main_airpcap_toolbar.h \
Makefile.common \
Makefile.nmake \
Makefile_custom.common \

View File

@ -40,11 +40,9 @@ GENERATED_FILES = \
GENERATOR_FILES = \
main.gresources.xml
WIRESHARK_GTK_SRC = \
WIRESHARK_COMMON_GTK_SRC = \
about_dlg.c \
addr_resolution_dlg.c \
airpcap_dlg.c \
airpcap_gui_utils.c \
bytes_view.c \
capture_dlg.c \
capture_file_dlg.c \
@ -89,7 +87,6 @@ WIRESHARK_GTK_SRC = \
macros_dlg.c \
main.c \
main_80211_toolbar.c \
main_airpcap_toolbar.c \
main_filter_toolbar.c \
main_menubar.c \
manual_addr_resolv.c \
@ -171,8 +168,6 @@ WIRESHARK_TAP_SRC = \
noinst_HEADERS = \
about_dlg.h \
addr_resolution_dlg.h \
airpcap_dlg.h \
airpcap_gui_utils.h \
bytes_view.h \
capture_dlg.h \
capture_file_dlg.h \
@ -223,7 +218,6 @@ noinst_HEADERS = \
lbm_uimflow_dlg.h \
macros_dlg.h \
main.h \
main_airpcap_toolbar.h \
main_filter_toolbar.h \
main_menubar_private.h \
main_80211_toolbar.h \

View File

@ -29,10 +29,13 @@ include Makefile.common
# if you add files here, be sure to include them also in Makefile.am EXTRA_DIST
WIRESHARK_CLEAN_LIBGTKUI_SRC = \
$(WIRESHARK_GTK_SRC) \
$(WIRESHARK_COMMON_GTK_SRC) \
$(WIRESHARK_TAP_SRC) \
$(GENERATED_C_FILES) \
airpcap_dlg.c \
airpcap_gui_utils.c \
capture_if_details_dlg_win32.c \
main_airpcap_toolbar.c \
pixbuf-csource.c
WIRESHARK_LIBGTKUI_SRC = \

View File

@ -24,8 +24,6 @@
#include "config.h"
#ifdef HAVE_AIRPCAP
#include <gtk/gtk.h>
#include <glib.h>
@ -2368,8 +2366,6 @@ airpcap_enable_toolbar_widgets(GtkWidget* w, gboolean en)
return;
}
#endif /* HAVE_AIRPCAP */
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*

View File

@ -26,8 +26,6 @@
#include "config.h"
#ifdef HAVE_AIRPCAP
#include <gtk/gtk.h>
#include "ui/gtk/old-gtk-compat.h"
@ -417,8 +415,6 @@ void airpcap_toolbar_show(GtkWidget *lcl_wireless_tb _U_)
}
}
#endif /* HAVE_AIRPCAP */
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*