-
Bug
-
Resolution: Unresolved
-
Medium
-
Processor SDK - Jacinto
-
ADASVISION-5918
-
PROCESSOR_SDK_09.00.00
-
PROCESSOR_SDK_10.02.00
-
Codec app compiler warnings with GCC 11.3 as shown below:
/ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c: In function ‘app_multi_cam_codec_main’:
/ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:2169:18: error: ‘snprintf’ argument 4 may overlap destination object ‘gAppObj’ [-Werror=restrict]
2169 | i += snprintf(¶ms->m_cmdString[i], CODEC_MAX_LEN_CMD_STR-i,"appsrc format=GST_FORMAT_TIME is-live=true do-timestamp=true block=false name=%s ! queue \n",params->m_AppSrcNameArr[ch]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:194:8: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here
194 | AppObj gAppObj;
| ^~~~~~~
/ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:2193:18: error: ‘snprintf’ argument 4 may overlap destination object ‘gAppObj’ [-Werror=restrict]
2193 | i += snprintf(¶ms->m_cmdString[i], CODEC_MAX_LEN_CMD_STR-i,"! appsink name=%s drop=true wait-on-eos=false max-buffers=4\n",params->m_AppSinkNameArr[ch]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:194:8: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here
194 | AppObj gAppObj;
| ^~~~~~~
In function ‘app_verify_graph’,
inlined from ‘app_multi_cam_codec_main’ at /ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:770:22:
/ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:1377:22: error: ‘appCodecSrcInit’ accessing 4096 bytes in a region of size 2048 [-Werror=stringop-overflow=]
1377 | status = appCodecSrcInit(obj->enc_pool.data_ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c: In function ‘app_multi_cam_codec_main’:
/ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:1377:22: note: referencing argument 1 of type ‘void * [8][4]’
In file included from /ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:68:
/ti/j7presi/workarea/vision_apps/utils/codec_wrapper/include/codec_wrapper.h:105:9: note: in a call to function ‘appCodecSrcInit’
105 | int32_t appCodecSrcInit(void* data_ptr[CODEC_MAX_BUFFER_DEPTH][CODEC_MAX_NUM_CHANNELS][CODEC_MAX_NUM_PLANES]);
| ^~~~~~~~~~~~~~~
In function ‘app_verify_graph’,
inlined from ‘app_multi_cam_codec_main’ at /ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:770:22:
/ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:1414:22: error: ‘appCodecSinkInit’ accessing 4096 bytes in a region of size 2048 [-Werror=stringop-overflow=]
1414 | status = appCodecSinkInit(obj->dec_pool.data_ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c: In function ‘app_multi_cam_codec_main’:
/ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:1414:22: note: referencing argument 1 of type ‘void * [8][4]’
In file included from /ti/j7presi/workarea/vision_apps/apps/basic_demos/app_multi_cam_codec/main.c:68:
/ti/j7presi/workarea/vision_apps/utils/codec_wrapper/include/codec_wrapper.h:116:9: note: in a call to function ‘appCodecSinkInit’
116 | int32_t appCodecSinkInit(void* data_ptr[CODEC_MAX_BUFFER_DEPTH][CODEC_MAX_NUM_CHANNELS][CODEC_MAX_NUM_PLANES]);