Move linker flag to LDFLAGS, disable compiler warnings, fix type conversion bug sandbox/dkson95/llvm
authorNikolai Merinov <n.merinov@samsung.com>
Wed, 30 Jan 2019 12:08:11 +0000 (15:08 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Tue, 5 Mar 2019 01:39:03 +0000 (10:39 +0900)
dali compiled with -Werror, but there are a lot of new clang warnings.
Disable specific warnings to allow code compilation

dali/internal/render/renderers/render-property-buffer.h
packaging/dali.spec

index 436bd06..9255c22 100644 (file)
@@ -174,7 +174,7 @@ public:
   template <typename T>
   inline T* GetDataTypedPtr()
   {
-    Dali::Vector< char >* data = mData.Release();
+    Dali::Vector< uint8_t >* data = mData.Release();
     mData = data;
     return reinterpret_cast<T*>( &data->operator[]( 0 ) );
   }
index 1ad3b20..89d541a 100644 (file)
@@ -131,6 +131,12 @@ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS;
 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS;
 LDFLAGS="${LDFLAGS:-%optflags}" ; export LDFLAGS;
 
+if echo "$CFLAGS" | grep -q -- '-Wl,--as-needed'; then
+  LDFLAGS="${LDFLAGS} -Wl,--as-needed"
+fi
+CFLAGS="$(echo $CFLAGS | sed -e 's/-Wl,--as-needed//g')"
+CXXFLAGS="$(echo $CXXFLAGS | sed -e 's/-Wl,--as-needed//g') -Wno-sign-conversion -Wno-mismatched-tags -Wno-inconsistent-missing-override -Wno-string-conversion"
+
 ./configure \
       --program-prefix=%{?_program_prefix} \
       --prefix=%{_prefix} \