Fix the build error using gcc 13 30/295230/1 accepted/tizen_unified_dev accepted/tizen/unified/20230706.152150 accepted/tizen/unified/dev/20230726.115715
authorSangYoun Kwak <sy.kwak@samsung.com>
Tue, 4 Jul 2023 04:43:08 +0000 (13:43 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Tue, 4 Jul 2023 04:43:08 +0000 (13:43 +0900)
commit6ca3154a65554a421e482dfb3ce79e12e5ab0a92
tree2bf7e178b0a2131e0c4b1e47a26ec751ecda2e2f
parent41ddb8ce7987a1b3f45a604ba9bf36a8ec856dce
Fix the build error using gcc 13

In the function "resourced_proc_dump" from src/process/proc-main.c, it
concatenates directory and filename and writes it into a buffer using
snprintf.
In this situation, the gcc-13 compiler complains about: the length of
directory + filename can be greater than the size of the buffer, so
it should be handled.
It is already handled by checking the lengths of the directory &
filename but the compiler don't know about it.
To fix this situation, codes for checking the return value of snprintf
have been added.

Change-Id: I2776c5164c57323212e09377ca0eff1f55279ec6
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
src/process/proc-main.c