hpcc-systems/HPCC-Platform — pull request #1538 by rengolin (2012-02-13 16:02:29+00:00)
Title: Silent printf warning

Macro ```ThrowStringException``` is used by other macros that build printf-like functions with varied number of arguments. The attribute is meant to check the format, but since there are more than one, the check only pass in one of them. The zero tells GCC to only check the format string, not the arguments themselves, so it's not completely removing all checks.

Another way to fix this warning would be to implement ```ThrowStringExceptionN``` for N between nil and 4, but that throws away the benefit of using variadic arguments in the first place. I don't feel particularly strong about this patch, either way is fine.

The warnings were:

/home/rengolin/workspace/hpcc/src/dali/ft/fttransform.cpp: In member function ‘void TransferServer::deserializeAction(MemoryBuffer&, unsigned int)’:
/home/rengolin/workspace/hpcc/src/dali/ft/fttransform.cpp:583:1: warning: format ‘%lld’ expects type ‘long long int’, but argument 3 has type ‘const char*’
/home/rengolin/workspace/hpcc/src/dali/ft/fttransform.cpp:583:1: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘const char*’
/home/rengolin/workspace/hpcc/src/dali/ft/fttransform.cpp:583:1: warning: too few arguments for format