summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-08-18 19:36:56 +0000
committerMoonchild <moonchild@palemoon.org>2020-08-18 19:36:56 +0000
commit46595e390555adf63a6d2e6c6476c4bdd2172cf2 (patch)
treeae763e6538b963104baca484ee870a7d248489b9
parent9074e69282caa4cceee26ca9ed42a83fd598265a (diff)
downloadUXP-46595e390555adf63a6d2e6c6476c4bdd2172cf2.tar
UXP-46595e390555adf63a6d2e6c6476c4bdd2172cf2.tar.gz
UXP-46595e390555adf63a6d2e6c6476c4bdd2172cf2.tar.lz
UXP-46595e390555adf63a6d2e6c6476c4bdd2172cf2.tar.xz
UXP-46595e390555adf63a6d2e6c6476c4bdd2172cf2.zip
Issue #457 - Silence SQLite compiler warning
Our use of SQLite explicitly avoids using MSVC's _msize which the lib would notrmally use. This was set up this way in BZ bug 719579 for legitimate reasons (because _msize would end up using the system symbol, which would crash trying to get the size information from jemalloc allocations). Since we build the SQLite lib separately there is no easy way to avoid this warning as it's not directly linked against mozglue.dll which has the jemalloc functions it wants for _msize when not using the system allocator. It is implicitly assuming the function is an extern returning an int (with the call specifically casting to int) which is correct (well, correct _enough_, anyway) so the warning can safely be ignored for our specific use as it all lines up at link time.
-rw-r--r--db/sqlite3/src/moz.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/db/sqlite3/src/moz.build b/db/sqlite3/src/moz.build
index eba8633b5..09a02206a 100644
--- a/db/sqlite3/src/moz.build
+++ b/db/sqlite3/src/moz.build
@@ -65,9 +65,13 @@ if CONFIG['MOZ_DEBUG']:
# Force using malloc_usable_size when building with jemalloc because _msize
# causes assertions on Win64. See bug 719579.
+# This causes a known warning due to the way mozjemalloc is linked and the
+# malloc_usable_size function not being available at compile time on MSVC
+# so we suppress that particular warning (C4013)
if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']:
DEFINES['HAVE_MALLOC_USABLE_SIZE'] = True
DEFINES['SQLITE_WITHOUT_MSIZE'] = True
+ CFLAGS += ['-wd4013']
# Omit unused functions to save some library footprint.
DEFINES['SQLITE_OMIT_DEPRECATED'] = True