From 3364257e827b23ff01e5632a984f6822142f3ed6 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Devenyi" Date: Fri, 14 Aug 2026 23:04:50 -0400 Subject: [PATCH] ENH: Give the cifti tools' gopt internal linkage afni_xml_tool.c and cifti_tool.c each define a file-scope `opts_t gopt` with external linkage, so the two share a symbol name and neither declares it in a header. Each is used only inside its own translation unit, always by address. Both files build executables rather than libraries, so `static` removes nothing from any shared library's exported symbols. Clears both -Wmissing-variable-declarations warnings. --- cifti/afni_xml_tool.c | 2 +- cifti/cifti_tool.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cifti/afni_xml_tool.c b/cifti/afni_xml_tool.c index a1471ebf..0ed277bc 100644 --- a/cifti/afni_xml_tool.c +++ b/cifti/afni_xml_tool.c @@ -19,7 +19,7 @@ typedef struct { int xverb; } opts_t; -opts_t gopt; +static opts_t gopt; /* ----------------------------------------------------------------- */ diff --git a/cifti/cifti_tool.c b/cifti/cifti_tool.c index b895c09f..0b71ace7 100644 --- a/cifti/cifti_tool.c +++ b/cifti/cifti_tool.c @@ -53,7 +53,7 @@ typedef struct { } opts_t; -opts_t gopt; +static opts_t gopt; /* ----------------------------------------------------------------- */