[Skiboot] [PATCH] hdata/vpd: fix printing (char*)0x00

Stewart Smith stewart at linux.ibm.com
Wed Jun 19 14:51:19 AEST 2019


Stewart Smith <stewart at linux.ibm.com> writes:
> GCC9 now catches this bug:
>
> In file included from hdata/vpd.c:17:
> In function ‘vpd_vini_parse’,
>     inlined from ‘vpd_data_parse’ at hdata/vpd.c:416:3:
> /home/stewart/skiboot/include/skiboot.h:93:31: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
>    93 | #define prlog(l, f, ...) do { _prlog(l, pr_fmt(f), ##__VA_ARGS__); } while(0)
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> hdata/vpd.c:390:5: note: in expansion of macro ‘prlog’
>   390 |     prlog(PR_WARNING,
>       |     ^~~~~
> hdata/vpd.c: In function ‘vpd_data_parse’:
> hdata/vpd.c:391:46: note: format string is defined here
>   391 |           "VPD: CCIN desc not available for: %s\n",
>       |                                              ^~
> cc1: all warnings being treated as errors
>
> Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
> ---
>  hdata/vpd.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

Merged to master as of ba977f2e4406f9de318afcdf5d666e77585ef269
-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list