Fatal.h
#include
#include
#define Error(Str) FatalError(Str)
#define FatalError(Str) fprintf(stderr,"%s\n" Str),exit(1)
Test.c
#include
#include "Fatal.h"
int main(int argc, char ** argv)
{
Error("Test to be wrong");
return 0;
}
gcc 编译时报:
warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=]
Error("Test to be wrong");
^
求解答。