Fixed the build error using gcc 13 79/295079/1 accepted/tizen_unified accepted/tizen_unified_dev tizen accepted/tizen/unified/20231226.154720 accepted/tizen/unified/20231226.180251 accepted/tizen/unified/dev/20230726.120024
authorwchang kim <wchang.kim@samsung.com>
Mon, 3 Jul 2023 00:36:09 +0000 (09:36 +0900)
committerwchang kim <wchang.kim@samsung.com>
Mon, 3 Jul 2023 00:36:09 +0000 (09:36 +0900)
Change-Id: Iafe4cb64230b1ae5703755c5ebea6a7974528cd3

utils/CMakeLists.txt
utils/MsgTextConvert.cpp

index 32c10c9..87d6288 100755 (executable)
@@ -54,6 +54,7 @@ ENDFOREACH(flag)
 
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DFEATURE_JAVA_MMS")
+ADD_DEFINITIONS("-Wno-stringop-truncation")
 
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
 
index 57edce3..5a276b8 100755 (executable)
@@ -498,7 +498,7 @@ int MsgTextConvert::convertUTF8ToUCS2(OUT unsigned char *pDestText, IN int maxLe
 
        cd = g_iconv_open("UTF16BE", "UTF8");
 
-       if (cd > 0) {
+       if (cd != (GIConv)-1) {
                err = g_iconv(cd, (char**)&pSrcText, (gsize*)&textLen, (char**)&unicodeTemp, (gsize*)&remainedBuffer);
        }
 
@@ -641,7 +641,7 @@ int MsgTextConvert::convertUCS2ToUTF8(OUT unsigned char *pDestText, IN int maxLe
 
        cd = g_iconv_open("UTF8", "UTF16BE");
 
-       if (cd > 0) {
+       if (cd != (GIConv)-1) {
                err = g_iconv(cd, (char**)&pSrcText, (gsize*)&textLen, (char**)&pDestText, (gsize*)&remainedBuffer);
        }
 
@@ -692,7 +692,7 @@ int MsgTextConvert::convertEUCKRToUTF8(OUT unsigned char *pDestText, IN int maxL
 
        cd = g_iconv_open("UTF8", "EUCKR");
 
-       if (cd > 0) {
+       if (cd != (GIConv)-1) {
                err = g_iconv(cd, (char**)&pSrcText, (gsize*)&textLen, (char**)&pDestText, (gsize*)&remainedBuffer);
        }
 
@@ -742,7 +742,7 @@ int MsgTextConvert::convertSHIFTJISToUTF8(OUT unsigned char *pDestText, IN int m
 
        cd = g_iconv_open("UTF8", "SHIFT-JIS");
 
-       if (cd > 0) {
+       if (cd != (GIConv)-1) {
                err = g_iconv(cd, (char**)&pSrcText, (gsize*)&textLen, (char**)&pDestText, (gsize*)&remainedBuffer);
        }