Le 8 nov. 2012 à 10:12, Hans Aberg a écrit : >> fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", >> file_name, line_number); > > It is a dynamic check which cannot be verified statically, so the clang > warning is perhaps inappropriate as default.
No, it's really static: it can perfectly see what both possible formats are, so it may, indeed, warn that in one of the cases the arguments are not used. I would bet that this warning would be addressed if GCC made similar warnings. But in the current state of affairs, I don't feel like lobbying to get patches applied in this piece of code.
