Merge Richard Cohen's 'cleanup-cflags' into master.

This commit is contained in:
John Ralls 2023-03-07 16:17:20 -08:00
commit 7d5154ce18
2 changed files with 8 additions and 8 deletions

View File

@ -590,14 +590,14 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON) set(CMAKE_C_EXTENSIONS ON)
if (UNIX) if (UNIX)
set( CMAKE_C_FLAGS "-Werror -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations ${CMAKE_C_FLAGS}") set( CMAKE_C_FLAGS "-Werror -Wall -Wmissing-prototypes -Wmissing-declarations ${CMAKE_C_FLAGS}")
set( CMAKE_C_FLAGS "-Wno-error=deprecated-declarations -Wno-error=parentheses ${CMAKE_C_FLAGS}") set( CMAKE_C_FLAGS "-Wno-error=deprecated-declarations ${CMAKE_C_FLAGS}")
set( CMAKE_CXX_FLAGS "-Werror -Wall -Wmissing-declarations -Wno-error=parentheses ${CMAKE_CXX_FLAGS}") set( CMAKE_CXX_FLAGS "-Werror -Wall -Wmissing-declarations ${CMAKE_CXX_FLAGS}")
set( CMAKE_CXX_FLAGS "-Wno-error=deprecated-declarations ${REGISTER_CXXFLAG} ${CMAKE_CXX_FLAGS}") set( CMAKE_CXX_FLAGS "-Wno-error=deprecated-declarations ${CMAKE_CXX_FLAGS}")
set( CMAKE_C_FLAGS_RELEASE "-O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ${CMAKE_C_FLAGS}") set( CMAKE_C_FLAGS_RELEASE "-O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ${CMAKE_C_FLAGS}")
endif() endif()
if (MINGW) if (MINGW)
set( CMAKE_C_FLAGS "-Werror -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-error=deprecated-declarations ${CMAKE_C_FLAGS}") set( CMAKE_C_FLAGS "-Werror -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-error=deprecated-declarations ${CMAKE_C_FLAGS}")
set( CMAKE_CXX_FLAGS "-DWINVER=0x0500 -D_EMULATE_GLIBC=0 ${CMAKE_CXX_FLAGS}") # Workaround for bug in gtest on mingw, see https://github.com/google/googletest/issues/893 and https://github.com/google/googletest/issues/920 set( CMAKE_CXX_FLAGS "-DWINVER=0x0500 -D_EMULATE_GLIBC=0 ${CMAKE_CXX_FLAGS}") # Workaround for bug in gtest on mingw, see https://github.com/google/googletest/issues/893 and https://github.com/google/googletest/issues/920
endif() endif()

View File

@ -1575,8 +1575,8 @@ checkcert_cb(GWEN_GUI *gwen_gui, const GWEN_SSLCERTDESCR *cert,
hash = GWEN_SslCertDescr_GetFingerPrint(cert); hash = GWEN_SslCertDescr_GetFingerPrint(cert);
status = GWEN_SslCertDescr_GetStatusText(cert); status = GWEN_SslCertDescr_GetStatusText(cert);
g_checksum_update (gcheck, hash, strlen (hash)); g_checksum_update (gcheck, (const guchar *)hash, strlen (hash));
g_checksum_update (gcheck, status, strlen (status)); g_checksum_update (gcheck, (const guchar *)status, strlen (status));
/* Did we get the permanently accepted certs from AqBanking? */ /* Did we get the permanently accepted certs from AqBanking? */
if (gui->permanently_accepted_certs) if (gui->permanently_accepted_certs)
@ -1597,7 +1597,7 @@ checkcert_cb(GWEN_GUI *gwen_gui, const GWEN_SSLCERTDESCR *cert,
g_warning("Can't check permanently accepted certs from invalid AqBanking cert store."); g_warning("Can't check permanently accepted certs from invalid AqBanking cert store.");
} }
g_checksum_get_digest (gcheck, cert_hash, &hashlen); g_checksum_get_digest (gcheck, (guint8 *)cert_hash, &hashlen);
g_checksum_free (gcheck); g_checksum_free (gcheck);
g_assert (hashlen <= sizeof (cert_hash)); g_assert (hashlen <= sizeof (cert_hash));