Fix ISO C forbids an empty translation unit [-Wpedantic] (airpcap)
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>
Wed, 25 Nov 2015 00:45:06 +0000 (00:45 +0000)
committerAlexis La Goutte <alexis.lagoutte@gmail.com>
Fri, 27 Nov 2015 22:22:06 +0000 (22:22 +0000)
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>
caputils/Makefile.am
caputils/Makefile.common
caputils/Makefile.nmake
caputils/airpcap_loader.c
configure.ac
ui/gtk/Makefile.am
ui/gtk/Makefile.common
ui/gtk/Makefile.nmake
ui/gtk/airpcap_gui_utils.c
ui/gtk/main_airpcap_toolbar.c

index fe3d5735e0b505d7f25649aca05735da16c00b50..1710d8b58768ca881fc43c06e8f9d71bcedafd44 100644 (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
index 75544e757ef5863d7ba536ef1161ddc813180e2a..ca4559473c2e30162360f7efa9947f6efe2fc824 100644 (file)
 # 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 \
index 1c9149771b07d84c84a39e5a1213319f365aac6b..f3eeae37c94275b89d831aae49ca31e18b00d00d 100644 (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 = \
index 7d2fbc7349e308932aa169eca0a70583058c06d9..98e4699b836f4d52342d79711460a82df9c8b7cb 100644 (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
index 7a31fc71cf5d46210fff6c111078af1c3e7bf7f2..53f291ebdd44a5be0504c136c4523281bf5f9420 100644 (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)
 
index 1806266542cf9635209dc990e639f8330193d93f..ba8e5b0d33a3455a3b3cff31f081174decafaf04 100644 (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          \
index 03c1591dc3859994b432f7f45750755db7f891e3..04e739985fbe4af9bab2b8711551c38722c25db2 100644 (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    \
index 93fef3dd8d0e2c3f88ddf9e747784320bd0a93d3..fee391f428add0af9211fe04b8bcb7f19ba08d01 100644 (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 = \
index c4c3f18e95c7d571d679f87587ac6ba09d2f551e..58459987d2ba68375b56bdd5b5e15f0d5784b6d3 100644 (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
  *
index dae692134c0877d49d7f30727e6d88991e908878..4be880527f4e8c9123d5210e80cab2804be085ac 100644 (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
  *