From ce6054a667029af3edc32cfd2e0e7c281cfdf332 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 8 Feb 2024 11:15:41 +0900 Subject: [PATCH] Move an embedded directive outside macro arguments Suppress warnings/errors by -Wembedded-directive with `-std=c99` on macOS. --- addr2line.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addr2line.c b/addr2line.c index 2a69dd0966..02a3e617a6 100644 --- a/addr2line.c +++ b/addr2line.c @@ -2384,13 +2384,14 @@ fill_lines(int num_traces, void **traces, int check_debuglink, goto fail; } else { - kprintf("'%s' is not a " # ifdef __LP64__ - "64" +# define bitsize "64" # else - "32" +# define bitsize "32" # endif + kprintf("'%s' is not a " bitsize "-bit Mach-O file!\n",binary_filename); +# undef bitsize close(fd); goto fail; }