Even more gcc 9 fixes after adding Wall to build root params 66/222466/2 accepted/tizen/unified/20200116.101852 submit/tizen/20200115.072123
authorTomasz Swierczek <t.swierczek@samsung.com>
Wed, 15 Jan 2020 07:05:42 +0000 (08:05 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Wed, 15 Jan 2020 07:20:29 +0000 (08:20 +0100)
Change-Id: I02f46b0d9d4661cc9fdbbdc3689ff1dc7d670bd1

packaging/cert-svc.spec
src/vcore/XmlsecAdapter.cpp

index 3a56a94..bc5068a 100644 (file)
@@ -107,6 +107,10 @@ export CXXFLAGS="$CXXFLAGS -DTIZEN_EMULATOR_MODE"
 export FFLAGS="$FFLAGS -DTIZEN_EMULATOR_MODE"
 %endif
 
+# gcc v9 and new Tizen toolchain adds Wall and this code pretty much always checks string & buffer lenghts
+export CFLAGS="$CFLAGS -Wno-stringop-truncation -Wno-stringop-overflow"
+export CXXFLAGS="$CXXFLAGS -Wno-stringop-truncation -Wno-stringop-overflow"
+
 %{!?build_type:%define build_type "Release"}
 %cmake . -DVERSION=%version \
          -DINCLUDEDIR=%_includedir \
index e7e0f12..92e8dc5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2019 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2016-2020 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *    Licensed under the Apache License, Version 2.0 (the "License");
  *    you may not use this file except in compliance with the License.
@@ -346,7 +346,7 @@ void XmlSec::validateFile(XmlSecContext &context, xmlSecKeysMngrPtr mngrPtr)
                if (dsigRefCtx->digestMethod
                                && dsigRefCtx->digestMethod->id
                                && dsigRefCtx->digestMethod->id->name) {
-                       auto digest = reinterpret_cast<const char *const>(
+                       auto digest = reinterpret_cast<const char *>(
                                                          dsigRefCtx->digestMethod->id->name);
 
                        if (DIGEST_MD5.compare(digest) == 0)