cfutils.c: Fix ISO C forbids an empty translation unit [-Wpedantic]
Change-Id: Iac9384e63a4e946c73832103f8d6949f0187fa38 Reviewed-on: https://code.wireshark.org/review/12147 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
parent
2932596b65
commit
e639a13d11
|
@ -1383,9 +1383,10 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
|
|||
# get version information from plists and thus need Core Foundation
|
||||
# to process those plists.
|
||||
#
|
||||
have_os_x_frameworks=no
|
||||
case "$host_os" in
|
||||
|
||||
darwin*)
|
||||
have_os_x_frameworks=yes
|
||||
AC_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks])
|
||||
APPLICATIONSERVICES_FRAMEWORKS="-framework ApplicationServices"
|
||||
SYSTEMCONFIGURATION_FRAMEWORKS="-framework SystemConfiguration"
|
||||
|
@ -1409,6 +1410,7 @@ esac
|
|||
AC_SUBST(APPLICATIONSERVICES_FRAMEWORKS)
|
||||
AC_SUBST(SYSTEMCONFIGURATION_FRAMEWORKS)
|
||||
AC_SUBST(COREFOUNDATION_FRAMEWORKS)
|
||||
AM_CONDITIONAL(HAVE_OS_X_FRAMEWORKS, [test "x$have_os_x_frameworks" = "xyes"])
|
||||
|
||||
#
|
||||
# On Solaris, check whether we have getexecname().
|
||||
|
|
|
@ -36,7 +36,6 @@ set(WSUTIL_FILES
|
|||
base64.c
|
||||
bitswap.c
|
||||
buffer.c
|
||||
cfutils.c
|
||||
clopts_common.c
|
||||
cmdarg_err.c
|
||||
copyright_info.c
|
||||
|
@ -78,6 +77,10 @@ set(WSUTIL_FILES
|
|||
${WSUTIL_PLATFORM_FILES}
|
||||
)
|
||||
|
||||
if(HAVE_OS_X_FRAMEWORKS)
|
||||
set(WSUTIL_FILES ${WSUTIL_FILES} cfutils.c)
|
||||
endif()
|
||||
|
||||
#
|
||||
# XXX - we're assuming MSVC doesn't require a flag to enable SSE 4.2
|
||||
# support, and that, if the compiler supports a flag for SSE 4.2
|
||||
|
|
|
@ -23,6 +23,10 @@ ACLOCAL_AMFLAGS = `../aclocal-flags`
|
|||
# Optional headers for ABI checking
|
||||
wsutil_optional_abi_includes =
|
||||
|
||||
if HAVE_OS_X_FRAMEWORKS
|
||||
wsutil_optional_abi_includes += cfutils.h
|
||||
endif
|
||||
|
||||
# Header files for functions in libwsutil's ABI on this platform.
|
||||
libwsutil_abi_INCLUDES = \
|
||||
$(libwsutil_nonrepl_INCLUDES) \
|
||||
|
@ -63,7 +67,15 @@ AM_CPPFLAGS = -I$(srcdir)/.. \
|
|||
$(LIBGCRYPT_CFLAGS) \
|
||||
-DTOP_SRCDIR=\"$(abs_top_srcdir)\"
|
||||
|
||||
libwsutil_la_SOURCES = \
|
||||
LIBWSUTIL_SRC = $(LIBWSUTIL_COMMON_SRC)
|
||||
LIBWSUTIL_INCLUDES = $(LIBWSUTIL_COMMON_INCLUDES)
|
||||
|
||||
if HAVE_OS_X_FRAMEWORKS
|
||||
LIBWSUTIL_SRC += cfutils.c
|
||||
LIBWSUTIL_INCLUDES += cfutils.h
|
||||
endif
|
||||
|
||||
libwsutil_la_SOURCES = \
|
||||
$(LIBWSUTIL_SRC) \
|
||||
$(LIBWSUTIL_INCLUDES)
|
||||
|
||||
|
@ -72,7 +84,7 @@ libwsutil_sse42_la_SOURCES = \
|
|||
|
||||
libwsutil_sse42_la_CFLAGS = $(AM_CFLAGS) @CFLAGS_SSE42@
|
||||
|
||||
EXTRA_libwsutil_la_SOURCES= \
|
||||
EXTRA_libwsutil_la_SOURCES = \
|
||||
floorl.c \
|
||||
floorl.h \
|
||||
inet_aton.c \
|
||||
|
@ -88,16 +100,18 @@ EXTRA_libwsutil_la_SOURCES= \
|
|||
wsgetopt.h \
|
||||
wsgetopt_int.h
|
||||
|
||||
libwsutil_la_DEPENDENCIES= \
|
||||
libwsutil_la_DEPENDENCIES = \
|
||||
$(wsutil_optional_objects)
|
||||
|
||||
libwsutil_la_LIBADD = \
|
||||
libwsutil_la_LIBADD = \
|
||||
@COREFOUNDATION_FRAMEWORKS@ \
|
||||
@GLIB_LIBS@ \
|
||||
@LIBGCRYPT_LIBS@ \
|
||||
$(wsutil_optional_objects)
|
||||
|
||||
EXTRA_DIST = \
|
||||
EXTRA_DIST = \
|
||||
cfutils.c \
|
||||
cfutils.h \
|
||||
CMakeLists.txt \
|
||||
Makefile.common \
|
||||
Makefile.nmake \
|
||||
|
|
|
@ -26,14 +26,13 @@
|
|||
# into a list of object files by replacing ".c" with ".obj") or files
|
||||
# generated from YACC or Lex files (as Automake doesn't want them in
|
||||
# _SOURCES variables).
|
||||
LIBWSUTIL_SRC = \
|
||||
LIBWSUTIL_COMMON_SRC = \
|
||||
adler32.c \
|
||||
aes.c \
|
||||
airpdcap_wep.c \
|
||||
base64.c \
|
||||
bitswap.c \
|
||||
buffer.c \
|
||||
cfutils.c \
|
||||
clopts_common.c \
|
||||
cmdarg_err.c \
|
||||
copyright_info.c \
|
||||
|
@ -80,10 +79,9 @@ libwsutil_nonrepl_INCLUDES = \
|
|||
aes.h \
|
||||
base64.h \
|
||||
bits_ctz.h \
|
||||
bits_count_ones.h \
|
||||
bits_count_ones.h \
|
||||
bitswap.h \
|
||||
buffer.h \
|
||||
cfutils.h \
|
||||
clopts_common.h \
|
||||
cmdarg_err.h \
|
||||
copyright_info.h \
|
||||
|
@ -127,11 +125,11 @@ libwsutil_nonrepl_INCLUDES = \
|
|||
ws_cpuid.h \
|
||||
ws_diag_control.h \
|
||||
ws_mempbrk.h \
|
||||
ws_mempbrk_int.h \
|
||||
ws_mempbrk_int.h \
|
||||
ws_version_info.h
|
||||
|
||||
# Header files that are not generated from other files
|
||||
LIBWSUTIL_INCLUDES = \
|
||||
LIBWSUTIL_COMMON_INCLUDES = \
|
||||
$(libwsutil_nonrepl_INCLUDES)
|
||||
|
||||
#
|
||||
|
|
|
@ -17,6 +17,8 @@ CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \
|
|||
.c.obj::
|
||||
$(CC) $(CFLAGS) -Fd.\ -c $<
|
||||
|
||||
LIBWSUTIL_SRC = $(LIBWSUTIL_COMMON_SRC)
|
||||
|
||||
# For use when making libwsutil.dll
|
||||
libwsutil_LIBS = $(GLIB_LIBS) \
|
||||
$(GNUTLS_LIBS)
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_OS_X_FRAMEWORKS
|
||||
#include <glib.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <wsutil/cfutils.h>
|
||||
|
@ -49,7 +48,6 @@ CFString_to_C_string(CFStringRef cfstring)
|
|||
}
|
||||
return string;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
#ifndef __WSUTIL_CFUTILS_H__
|
||||
#define __WSUTIL_CFUTILS_H__
|
||||
|
||||
#ifdef HAVE_OS_X_FRAMEWORKS
|
||||
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -42,6 +40,4 @@ WS_DLL_PUBLIC char *CFString_to_C_string(CFStringRef cfstring);
|
|||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* HAVE_OS_X_FRAMEWORKS */
|
||||
|
||||
#endif /* __WSUTIL_CFUTILS_H__ */
|
||||
|
|
Loading…
Reference in New Issue