From 288f5df8d11f225f0e1996f9092e3d1b8848c84f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 12 Jan 2023 14:18:38 +1030 Subject: [PATCH] ccan: update to fix recent gcc "comparison will always evaluate as 'false'" warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` lightningd/jsonrpc.c: In function ‘destroy_json_command’: lightningd/jsonrpc.c:1180:63: error: the comparison will always evaluate as ‘false’ for the address of ‘canary’ will never be NULL [-Werror=address] lightningd/jsonrpc.c:108:53: note: ‘canary’ declared here ``` Signed-off-by: Rusty Russell --- ccan/README | 2 +- ccan/ccan/tcon/tcon.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ccan/README b/ccan/README index ad5b8d61f..17f9a28d1 100644 --- a/ccan/README +++ b/ccan/README @@ -1,3 +1,3 @@ CCAN imported from http://ccodearchive.net. -CCAN version: init-2548-gab87e56b +CCAN version: init-2549-gba79e21b diff --git a/ccan/ccan/tcon/tcon.h b/ccan/ccan/tcon/tcon.h index e0f84b383..df3aac88b 100644 --- a/ccan/ccan/tcon/tcon.h +++ b/ccan/ccan/tcon/tcon.h @@ -147,8 +147,7 @@ * It evaluates to @x so you can chain it. */ #define tcon_check_ptr(x, canary, expr) \ - (sizeof(&(x)->_tcon[0].canary == (expr)) ? (x) : (x)) - + (sizeof((expr) ? (expr) : &(x)->_tcon[0].canary) ? (x) : (x)) /** * tcon_type - the type within a container (or void *)