Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource.c: WA for GCC's -Wstringop-truncation bug
When file includes both common.c & resource.c, i.e. GCC (13.2.1) sees how latter uses functions from former, there's: ------------------------------------------------------------- utils/common/common.c: In function ‘otel_resource_attributes’: utils/common/common.c:92:3: error: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] 92 | strncpy(dest, src != NULL ? src : "", n - 1); | ^ ------------------------------------------------------------- Although the next line from sstrncpy() _does_ set terminator... As this is the only place I've seen this, increase stack array size to keep the otherwise useful GCC warning option. Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
- Loading branch information