Fix gcc9 build warnings 32/221932/1 accepted/tizen/unified/20200109.065607 submit/tizen/20200109.031349
authorDongwoo Lee <dwoo08.lee@samsung.com>
Wed, 8 Jan 2020 08:53:40 +0000 (17:53 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Wed, 8 Jan 2020 08:53:40 +0000 (17:53 +0900)
This fixes build warnings on compiling with gcc9.

Change-Id: I7ff58499fc2813931ff49c8f7d58e851b08ef5dc
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
src/dfu.c
src/thor.c

index 4edf1a1..ea548f5 100644 (file)
--- a/src/dfu.c
+++ b/src/dfu.c
@@ -102,7 +102,8 @@ static char *get_partition_fstype(const char *devname)
        blkid_tag_iterate tag_iter;
        blkid_dev dev;
        blkid_cache cache = NULL;
-       const char *type, *value, *fstype = NULL;
+       const char *type, *value;
+       char *fstype = NULL;
        int ret;
 
        ret = blkid_get_cache(&cache, NULL);
index 1d131cf..d6dfa09 100644 (file)
@@ -81,7 +81,7 @@ static int thor_process_rqt_info(struct tfm_context *ctx, struct rqt_pkt *rqt)
        case RQT_INFO_VER_KERNEL:
        case RQT_INFO_VER_PLATFORM:
        case RQT_INFO_VER_CSC:
-               strncpy(rsp.str_data[0], "Unknown", sizeof("Unknown"));
+               strncpy(rsp.str_data[0], "Unknown", 32);
                break;
        default:
                fprintf(stderr, "Not supported information request: %d\n",