From 8d3e6a05dceb646a00d2b6f4792620e7140fd4f7 Mon Sep 17 00:00:00 2001 From: hj kim Date: Fri, 17 Apr 2020 16:09:38 +0900 Subject: [PATCH] Fix build warning Change-Id: I73c2ae9f0ea30c9adbd01f2a7fe0ebd365a695aa --- packaging/libmm-camcorder.spec | 2 +- src/Makefile.am | 2 +- src/mm_camcorder_gstcommon.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index 3cff0c9..2fb3628 100644 --- a/packaging/libmm-camcorder.spec +++ b/packaging/libmm-camcorder.spec @@ -1,6 +1,6 @@ Name: libmm-camcorder Summary: Camera and recorder library -Version: 0.10.196 +Version: 0.10.197 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/Makefile.am b/src/Makefile.am index 3808f77..01f6d46 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -76,7 +76,7 @@ libmmfcamcorder_la_LIBADD = \ $(STORAGE_LIBS) libmmfcamcorder_la_CFLAGS += -D_FILE_OFFSET_BITS=64 -libmmfcamcorder_la_CFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections +libmmfcamcorder_la_CFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections -Wall -Werror libmmfcamcorder_la_LDFLAGS = -Wl,--gc-sections libmmfcamcorder_la_LIBADD += $(SYSTEMINFO_LIBS) diff --git a/src/mm_camcorder_gstcommon.c b/src/mm_camcorder_gstcommon.c index 048c2d7..cf25032 100644 --- a/src/mm_camcorder_gstcommon.c +++ b/src/mm_camcorder_gstcommon.c @@ -2806,7 +2806,7 @@ bool _mmcamcorder_set_videosrc_caps(MMHandleType handle, unsigned int fourcc, in NULL); } else { char fourcc_string[sizeof(fourcc)+1]; - strncpy(fourcc_string, (char*)&fourcc, sizeof(fourcc)); + memcpy(fourcc_string, (char*)&fourcc, sizeof(fourcc)); fourcc_string[sizeof(fourcc)] = '\0'; caps = gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING, fourcc_string, -- 2.34.1