Compiling this code: #include <stdio.h>
void f(char* line) { char test_char[40]; sscanf(line, "%s", &test_char); } gives the following warning: warning: format '%s' expects type 'char *', but argument 3 has type 'char (*)[39u]' I'd have though that &test_char had type char (*)[40]. -- Summary: Wrong type in warning Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jm at bourguet dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27558