diff options
author | jbj <jbj> | 2015-05-13 13:09:27 +0000 |
---|---|---|
committer | jbj <jbj> | 2015-05-13 13:09:27 +0000 |
commit | 32d47de85df1a4d2a5467b0ca5a0d9e007ca000c (patch) | |
tree | eddac16bf72e46102691fe3183dba367c3b6ce57 /popthelp.c | |
parent | f59b34478bd4e00fada2dbc5b2299f7a0c4d1631 (diff) | |
download | libpopt-32d47de85df1a4d2a5467b0ca5a0d9e007ca000c.tar.gz |
- cppcheck: annotate/fix warnings.
- resurrect make distcheck.
Diffstat (limited to 'popthelp.c')
-rw-r--r-- | popthelp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -55,6 +55,7 @@ static void displayArgs(poptContext con, poptPrintUsage(con, stdout, 0); #if !defined(__LCLINT__) /* XXX keep both splint & valgrind happy */ + // cppcheck-suppress uselessAssignmentPtrArg con = poptFreeContext(con); #endif exit(0); @@ -484,7 +485,6 @@ assert(t); /* XXX can't happen */ helpLength = strlen(help); while (helpLength > lineLength) { const char * ch; - char format[16]; ch = help + lineLength - 1; while (ch > help && !_isspaceptr(ch)) @@ -500,6 +500,7 @@ assert(t); /* XXX can't happen */ */ { char * fmthelp = xstrdup(help); if (fmthelp) { + char format[16]; fmthelp[ch - help] = '\0'; sprintf(format, "%%s\n%%%ds", (int) indentLength); /*@-formatconst@*/ |