diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-08 22:06:14 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-08 22:06:14 +0100 |
commit | b16ad968499aeb29b6ff9be6cc64fb41522a4a5e (patch) | |
tree | e39115834188725e59d28fa612e84016f0882bcd /runtime/tools/ccfilter.c | |
parent | c838626fea42ed5924ee6084d87d1b37b2d7b0ff (diff) |
patch 8.2.0106: printf formats are not exactly rightv8.2.0106
Problem: Printf formats are not exactly right.
Solution: Adjust signed/unsigned conversions. (Frazer Clews, closes #5456)
Diffstat (limited to 'runtime/tools/ccfilter.c')
-rw-r--r-- | runtime/tools/ccfilter.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/runtime/tools/ccfilter.c b/runtime/tools/ccfilter.c index 8539e2a3dc..43489f16c2 100644 --- a/runtime/tools/ccfilter.c +++ b/runtime/tools/ccfilter.c @@ -184,7 +184,7 @@ int main( int argc, char *argv[] ) case COMPILER_GCC: Severity = 'e'; #ifdef GOTO_FROM_WHERE_INCLUDED - rv = sscanf( Line, "In file included from %[^:]:%u:", + rv = sscanf( Line, "In file included from %[^:]:%lu:", FileName, &Row ); if ( rv == 2 ) { @@ -193,11 +193,11 @@ int main( int argc, char *argv[] ) else #endif { - if ((rv = sscanf( Line, "%[^:]:%u: warning: %[^\n]", + if ((rv = sscanf( Line, "%[^:]:%lu: warning: %[^\n]", FileName, &Row, Reason ))==3) { Severity = 'w'; } else { - rv = sscanf( Line, "%[^:]:%u: %[^\n]", + rv = sscanf( Line, "%[^:]:%lu: %[^\n]", FileName, &Row, Reason ); } ok = ( rv == 3 ); @@ -205,24 +205,24 @@ int main( int argc, char *argv[] ) Col = (dec_col ? 1 : 0 ); break; case COMPILER_AIX: - rv = sscanf( Line, "\"%[^\"]\", line %u.%u: %*s (%c) %[^\n]", + rv = sscanf( Line, "\"%[^\"]\", line %lu.%lu: %*s (%c) %[^\n]", FileName, &Row, &Col, &Severity, Reason ); ok = ( rv == 5 ); break; case COMPILER_HPUX: - rv = sscanf( Line, "cc: \"%[^\"]\", line %u: %c%*[^:]: %[^\n]", + rv = sscanf( Line, "cc: \"%[^\"]\", line %lu: %c%*[^:]: %[^\n]", FileName, &Row, &Severity, Reason ); ok = ( rv == 4 ); Col = (dec_col ? 1 : 0 ); break; case COMPILER_SOLARIS: - rv = sscanf( Line, "\"%[^\"]\", line %u: warning: %[^\n]", + rv = sscanf( Line, "\"%[^\"]\", line %lu: warning: %[^\n]", FileName, &Row, Reason ); Severity = 'w'; ok = ( rv == 3 ); if ( rv != 3 ) { - rv = sscanf( Line, "\"%[^\"]\", line %u: %[^\n]", + rv = sscanf( Line, "\"%[^\"]\", line %lu: %[^\n]", FileName, &Row, Reason ); Severity = 'e'; ok = ( rv == 3 ); @@ -230,18 +230,18 @@ int main( int argc, char *argv[] ) Col = (dec_col ? 1 : 0 ); break; case COMPILER_ATT: - rv = sscanf( Line, "%c \"%[^\"]\",L%u/C%u%*[^:]:%[^\n]", + rv = sscanf( Line, "%c \"%[^\"]\",L%lu/C%lu%*[^:]:%[^\n]", &Severity, FileName, &Row, &Col, Reason ); ok = ( rv == 5 ); if (rv != 5) - { rv = sscanf( Line, "%c \"%[^\"]\",L%u/C%u: %[^\n]", + { rv = sscanf( Line, "%c \"%[^\"]\",L%lu/C%lu: %[^\n]", &Severity, FileName, &Row, &Col, Reason ); ok = ( rv == 5 ); } if (rv != 5) - { rv = sscanf( Line, "%c \"%[^\"]\",L%u: %[^\n]", + { rv = sscanf( Line, "%c \"%[^\"]\",L%lu: %[^\n]", &Severity, FileName, &Row, Reason ); ok = ( rv == 4 ); Col = (dec_col ? 1 : 0 ); @@ -272,10 +272,10 @@ int main( int argc, char *argv[] ) } else { - rv = sscanf( p+2, "%[^:]: %u: %[^\n]", + rv = sscanf( p+2, "%[^:]: %lu: %[^\n]", FileName, &Row, Reason ); if (rv != 3) - rv = sscanf( p+2, "%[^,], line %u: %[^\n]", + rv = sscanf( p+2, "%[^,], line %lu: %[^\n]", FileName, &Row, Reason ); ok = ( rv == 3 ); } @@ -315,10 +315,10 @@ int main( int argc, char *argv[] ) { for (p=Reason; (*p) && (isspace(*p)); p++); if ( BasePath[CWDlen] == 0 ) - printf( "%s:%u:%u:%c:%s\n", FileName, Row, Col, Severity, p ); + printf( "%s:%lu:%lu:%c:%s\n", FileName, Row, Col, Severity, p ); else { - printf( "%s/%s:%u:%u:%c:%s\n", &BasePath[CWDlen+1], FileName, Row, Col, Severity, p ); + printf( "%s/%s:%lu:%lu:%c:%s\n", &BasePath[CWDlen+1], FileName, Row, Col, Severity, p ); } } if (!prefetch) |