linux
Null stub missing parameter when !TRACING
The actual implementation takes an int argument but the null stub, for the case when tracing is disabled, does not declare it.
Bug fixed by commit e67bc51e574
| Type | WrongFunArgNum |
| Config | "!TRACING" (1st degree) |
| Fix-in | code |
| Location | include/linux/ |
#ifdef CONFIG_TRACING
void trace_dump_stack(int skip) {
// do something
return;
}
#else
static inline void trace_dump_stack(void) { }
#endif
int main(int argc, char** argv) {
trace_dump_stack(0); // ERROR
return 0;
}
diff --git a/simple/e67bc51.c b/simple/e67bc51.c
--- a/simple/e67bc51.c
+++ b/simple/e67bc51.c
@@ -5,7 +5,7 @@
return;
}
#else
-static inline void trace_dump_stack(void) { }
+static inline void trace_dump_stack(int skip) { }
#endif
int main(int argc, char** argv) {
int main(int argc, char** argv) {
// trace_dump_stack(0); // ERROR
#ifdef CONFIG_TRACING
// do something
return;
#else
#endif
return 0;
}