Skip to content

Commit 2cfa73c

Browse files
committed
tests: suppress -Wmissing-variable-declarations in viewer test stubs
Add extern forward declarations for global linker stub variables (mc_skin_color__cache, mc_editor_plugin_list, we_are_strstrstrbackground) to satisfy -Wmissing-variable-declarations. These variables must remain non-static as they are referenced by name from libinternal.a objects. Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
1 parent d494820 commit 2cfa73c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/src/viewer/mcview__load_zip_magic.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,19 @@
4141
#pragma GCC diagnostic push
4242
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
4343

44+
extern int mc_skin_color__cache[64];
4445
int mc_skin_color__cache[64];
45-
void tty_lowlevel_setcolor (MC_UNUSED int color) {}
46+
47+
extern void *mc_editor_plugin_list;
4648
void *mc_editor_plugin_list = NULL;
49+
50+
extern int we_are_strstrstrbackground;
51+
int we_are_strstrstrbackground = 0;
52+
53+
void tty_lowlevel_setcolor (MC_UNUSED int color) {}
4754
void mc_editor_plugin_add (MC_UNUSED void *p) {}
4855
void mc_editor_plugins_load (void) {}
4956
int button_get_width (MC_UNUSED void *b) { return 0; }
50-
int we_are_strstrstrbackground = 0;
5157

5258
#pragma GCC diagnostic pop
5359

0 commit comments

Comments
 (0)