From 1b3f6ff1f6851efca4aa22fb7bbf3c6717215833 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 31 May 2019 08:36:37 -0400 Subject: [PATCH] lib: Fix gcc 9 warning -> error issue gcc is complaing about this with --enable-dev and --enable-werror: In function 'nb_log_callback', inlined from 'nb_transaction_apply_finish' at lib/northbound.c:1106:4: lib/northbound.c:777:2: error: '%s' directive argument is null [-Werror=format-overflow=] 777 | zlog_debug( | ^~~~~~~~~~~ 778 | "northbound callback: event [%s] op [%s] xpath [%s] value [%s]", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 779 | nb_event_name(event), nb_operation_name(operation), xpath, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 780 | value); | ~~~~~~ CC lib/ringbuf.lo Signed-off-by: Donald Sharp --- lib/northbound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/northbound.c b/lib/northbound.c index dbf90c58d4..8a5cd0ef14 100644 --- a/lib/northbound.c +++ b/lib/northbound.c @@ -777,7 +777,7 @@ static void nb_log_callback(const enum nb_event event, zlog_debug( "northbound callback: event [%s] op [%s] xpath [%s] value [%s]", nb_event_name(event), nb_operation_name(operation), xpath, - value); + value ? value : "(NULL)"); } /* -- 2.39.5