Skip to content

Commit

Permalink
fixed shorten-64-to-32 warning for gengetopt generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmorgner committed Feb 28, 2024
1 parent 97663e6 commit e59586d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ AX_CODE_COVERAGE()

AX_CHECK_COMPILE_FLAG([-Wunknown-warning-option], [have_unknown_warning_option="yes"], [have_unknown_warning_option="no"])
AM_CONDITIONAL([HAVE_UNKNOWN_WARNING_OPTION], [test "${have_unknown_warning_option}" = "yes"])
AX_CHECK_COMPILE_FLAG([-Wshorten-64-to-32], [have_shorten_warning_option="yes"], [have_shorten_warning_option="no"])
AM_CONDITIONAL([HAVE_SHORTEN_WARNING_OPTION], [test "${have_shorten_warning_option}" = "yes"])

AX_VALGRIND_CHECK()

Expand Down
25 changes: 23 additions & 2 deletions src/tools/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -107,38 +107,59 @@ npa_tool_CFLAGS = $(OPTIONAL_OPENSSL_CFLAGS) $(OPENPACE_CFLAGS)
if HAVE_UNKNOWN_WARNING_OPTION
npa_tool_CFLAGS += -Wno-unknown-warning-option
endif
if HAVE_SHORTEN_WARNING_OPTION
npa_tool_CFLAGS += -Wno-shorten-64-to-32
endif

opensc_notify_SOURCES = opensc-notify.c opensc-notify-cmdline.c
opensc_notify_CFLAGS = $(PTHREAD_CFLAGS)
opensc_notify_CFLAGS =
if HAVE_UNKNOWN_WARNING_OPTION
opensc_notify_CFLAGS += -Wno-unknown-warning-option
endif
if HAVE_SHORTEN_WARNING_OPTION
opensc_notify_CFLAGS += -Wno-shorten-64-to-32
endif

egk_tool_SOURCES = egk-tool.c util.c egk-tool-cmdline.c
egk_tool_LDADD = $(OPTIONAL_ZLIB_LIBS)
egk_tool_CFLAGS = $(OPTIONAL_ZLIB_CFLAGS)
if HAVE_UNKNOWN_WARNING_OPTION
egk_tool_CFLAGS += -Wno-unknown-warning-option
endif
if HAVE_SHORTEN_WARNING_OPTION
egk_tool_CFLAGS += -Wno-shorten-64-to-32
endif

goid_tool_SOURCES = goid-tool.c util.c fread_to_eof.c goid-tool-cmdline.c
goid_tool_LDADD = $(OPENPACE_LIBS)
goid_tool_CFLAGS = $(OPENPACE_CFLAGS)
if HAVE_UNKNOWN_WARNING_OPTION
goid_tool_CFLAGS += -Wno-unknown-warning-option
endif
if HAVE_SHORTEN_WARNING_OPTION
goid_tool_CFLAGS += -Wno-shorten-64-to-32
endif

dtrust_tool_SOURCES = dtrust-tool.c util.c

opensc_asn1_SOURCES = opensc-asn1.c fread_to_eof.c opensc-asn1-cmdline.c
opensc_asn1_CFLAGS =
if HAVE_UNKNOWN_WARNING_OPTION
opensc_asn1_CFLAGS = -Wno-unknown-warning-option
opensc_asn1_CFLAGS += -Wno-unknown-warning-option
endif
if HAVE_SHORTEN_WARNING_OPTION
opensc_asn1_CFLAGS += -Wno-shorten-64-to-32
endif

pkcs11_register_SOURCES = pkcs11-register.c fread_to_eof.c pkcs11-register-cmdline.c
pkcs11_register_LDADD = $(top_builddir)/src/common/libpkcs11.la
pkcs11_register_CFLAGS =
if HAVE_UNKNOWN_WARNING_OPTION
pkcs11_register_CFLAGS = -Wno-unknown-warning-option
pkcs11_register_CFLAGS += -Wno-unknown-warning-option
endif
if HAVE_SHORTEN_WARNING_OPTION
pkcs11_register_CFLAGS += -Wno-shorten-64-to-32
endif

.PHONY: cmdline
Expand Down

0 comments on commit e59586d

Please sign in to comment.