Skip to content
Snippets Groups Projects
Commit 10828bb4 authored by Simon McVittie's avatar Simon McVittie
Browse files

capsule-shim.h: Make shims more warnings-compliant


Making backtrace_shim_call static avoids failure to build under
-Wmissing-declarations, and also avoids accidentally exporting it
from a library.

Declaring the stubs avoids failure to build under
-Wmissing-declarations. Marking the stubs as noreturn avoids failure
to build under -Wsuggest-attribute=noreturn.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent c227190b
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
......@@ -26,6 +26,7 @@
#include <capsule.h>
#define UNVERSIONED_STUB(name) \
void name (void) __attribute__((noreturn)); \
void name (void) \
{ \
fprintf(stderr, "! SHIM " #name " called\n" ); \
......@@ -36,7 +37,8 @@
#define VERSIONED_STUB(name,version) \
UNVERSIONED_STUB(name);
void backtrace_shim_call (void)
static void
backtrace_shim_call (void)
{
void *trace[16] = { NULL };
int traced = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment