tests: varlocs workaround format-overflow errors 01/277301/1 accepted/tizen_7.0_base accepted/tizen_7.0_base_hotfix accepted/tizen_7.0_base_tool accepted/tizen_7.0_base_tool_hotfix tizen_7.0_base tizen_7.0_base_hotfix tizen_7.5_base accepted/tizen/7.0/base/20230714.002859 accepted/tizen/7.0/base/hotfix/20230714.003715 accepted/tizen/7.0/base/tool/20221028.113133 accepted/tizen/7.0/base/tool/hotfix/20221115.084921 accepted/tizen/base/tool/20220718.041500 submit/tizen_7.0_base/20221028.200901 submit/tizen_7.0_base_hotfix/20221115.161501 submit/tizen_base/20220706.012628 submit/tizen_base/20220707.010134 submit/tizen_base/20220715.044133 tizen_7.0_m2_release
authorMark Wielaard <mark@klomp.org>
Sat, 4 Dec 2021 00:18:42 +0000 (01:18 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 5 Jul 2022 01:39:41 +0000 (10:39 +0900)
commite54ff499b149048b1b28e95c3587b61e23516ce3
tree2c8f21949fb54bcf28b251c6233d4389b5be3c7f
parent88b09d3903a889e2ece4b508df90be3a7e2a56ef
tests: varlocs workaround format-overflow errors

In function ‘printf’,
    inlined from ‘handle_attr’ at varlocs.c:932:3:
error: ‘%s’ directive argument is null [-Werror=format-overflow=]

The warning is technically correct. A %s argument should not be
NULL. Although in practice all implementations will print it as
"(null)". Workaround this by simply changing the dwarf string
functions to return an "<unknown>" string. The test is for the correct
names, either "(null)" or "<unknown>" would make it fail (also remove
a now unnecessary assert, the switch statement will check for unknown
opcodes anyway).

Signed-off-by: Mark Wielaard <mark@klomp.org>
[sw0312.kim: partially pick upstream commit fd2cadbe4749f43551f7df90ee41837d83a6fbc4
   to fix build warning except src/ChangeLog]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I52273c671e9ecea250135096629e708163c5aa16
tests/varlocs.c