mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 05:42:46 +01:00
kbuild: declare the modpost error functions as printf like
This way gcc can warn for wrong format strings Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
This commit is contained in:
1 parent
6e588f6dcf
commit
6d9a89ea4b
1 file changed
+5
-3
@@ -33,7 +33,9 @@ enum export {
|
||||
export_unused_gpl, export_gpl_future, export_unknown
|
||||
};
|
||||
|
||||
void fatal(const char *fmt, ...)
|
||||
#define PRINTF __attribute__ ((format (printf, 1, 2)))
|
||||
|
||||
PRINTF void fatal(const char *fmt, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
|
||||
@@ -46,7 +48,7 @@ void fatal(const char *fmt, ...)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void warn(const char *fmt, ...)
|
||||
PRINTF void warn(const char *fmt, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
|
||||
@@ -57,7 +59,7 @@ void warn(const char *fmt, ...)
|
||||
va_end(arglist);
|
||||
}
|
||||
|
||||
void merror(const char *fmt, ...)
|
||||
PRINTF void merror(const char *fmt, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
|
||||
|
||||
Reference in new issue
Block a user