-3
int /usage( const char* name )
{
   fprintf( stderr, "usage: %s\n", name );

   fprintf( stderr, "\t[ -h a | c ]\n"
            "\t\thealthcheck - amf or comp invoked\n" );
   fprintf( stderr, "\t[ -e a | s | q | r | p | x ]\n"
            "\t\terror assignment (x error all)\n" );
   fprintf( stderr, "\t[ -f invocation_number ]\n"
            "\t\tfail specified healthcheck invocation\n" );
   fprintf( stderr, "\t[ -i a | s | q | r | p | x ]\n"
            "\t\tignore assignment (x ignore all)\n" );
   fprintf( stderr, "\t[ -m b]\n"
                    "\t\tpassive monitoring - start\n");
   fprintf( stderr, "\t[ -p proxied ]\n"
            "\t\tregister for proxied\n" );
   fprintf( stderr, "\t[ -s ]\n"
            "\t\tsuppress component output\n" );
   fprintf( stderr, "\t[ -z ]\n"`enter code here`
            "\t\tsuppress component registration\n" );
   return 1;
}

请帮助我摆脱该警告。因为我从几天开始就面临这个问题。有更多相同类型的警告。提前谢谢你。

4

1 回答 1

1

你的函数签名中有一个杂散\,它不能在那里:

int usage( const char* name )
{
   fprintf( stderr, "usage: %s\n", name );

   fprintf( stderr, "\t[ -h a | c ]\n"
            "\t\thealthcheck - amf or comp invoked\n" );
   fprintf( stderr, "\t[ -e a | s | q | r | p | x ]\n"
            "\t\terror assignment (x error all)\n" );
   fprintf( stderr, "\t[ -f invocation_number ]\n"
            "\t\tfail specified healthcheck invocation\n" );
   fprintf( stderr, "\t[ -i a | s | q | r | p | x ]\n"
            "\t\tignore assignment (x ignore all)\n" );
   fprintf( stderr, "\t[ -m b]\n"
                    "\t\tpassive monitoring - start\n");
   fprintf( stderr, "\t[ -p proxied ]\n"
            "\t\tregister for proxied\n" );
   fprintf( stderr, "\t[ -s ]\n"
            "\t\tsuppress component output\n" );
   fprintf( stderr, "\t[ -z ]\n"
            "\t\tsuppress component registration\n" );
   return 1;
}
于 2013-03-29T12:48:12.470 回答