summaryrefslogtreecommitdiff
path: root/popt
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-10-16 14:58:57 +0000
committerjbj <devnull@localhost>2001-10-16 14:58:57 +0000
commit9f45bcd3ecf3f3548ed7a8490b882a6ca9ffeb94 (patch)
tree65c941cf8e72c29c2d63822cd98aec4db0967afc /popt
parentcafccc00586497bdc9c5a4c12b19709fbd417976 (diff)
downloadrpm-9f45bcd3ecf3f3548ed7a8490b882a6ca9ffeb94.tar.gz
rpm-9f45bcd3ecf3f3548ed7a8490b882a6ca9ffeb94.tar.bz2
rpm-9f45bcd3ecf3f3548ed7a8490b882a6ca9ffeb94.zip
More lclint annotations.
CVS patchset: 5116 CVS date: 2001/10/16 14:58:57
Diffstat (limited to 'popt')
-rw-r--r--popt/po/popt.pot24
-rw-r--r--popt/popt.c22
2 files changed, 27 insertions, 19 deletions
diff --git a/popt/po/popt.pot b/popt/po/popt.pot
index 4efb27c75..86265e374 100644
--- a/popt/po/popt.pot
+++ b/popt/po/popt.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-10-15 13:39-0400\n"
+"POT-Creation-Date: 2001-10-16 10:48-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,48 +18,48 @@ msgstr ""
msgid "unknown errno"
msgstr ""
-#: popt.c:903
+#: popt.c:909
#, c-format
msgid "option type (%d) not implemented in popt\n"
msgstr ""
-#: popt.c:1114
+#: popt.c:1120
msgid "missing argument"
msgstr ""
-#: popt.c:1116
+#: popt.c:1122
msgid "unknown option"
msgstr ""
-#: popt.c:1118
+#: popt.c:1124
msgid "mutually exclusive logical operations requested"
msgstr ""
-#: popt.c:1120
+#: popt.c:1126
msgid "opt->arg should not be NULL"
msgstr ""
-#: popt.c:1122
+#: popt.c:1128
msgid "aliases nested too deeply"
msgstr ""
-#: popt.c:1124
+#: popt.c:1130
msgid "error in parameter quoting"
msgstr ""
-#: popt.c:1126
+#: popt.c:1132
msgid "invalid numeric value"
msgstr ""
-#: popt.c:1128
+#: popt.c:1134
msgid "number too large or too small"
msgstr ""
-#: popt.c:1130
+#: popt.c:1136
msgid "memory allocation failed"
msgstr ""
-#: popt.c:1134
+#: popt.c:1140
msgid "unknown error"
msgstr ""
diff --git a/popt/popt.c b/popt/popt.c
index c7ec5bf99..728bf8c50 100644
--- a/popt/popt.c
+++ b/popt/popt.c
@@ -67,9 +67,9 @@ static void invokeCallbacksPRE(poptContext con, const struct poptOption * opt)
poptCallbackType cb = (poptCallbackType)opt->arg;
/*@=castfcnptr@*/
/* Perform callback. */
- /*@-moduncon@*/
+ /*@-moduncon -noeffectuncon @*/
cb(con, POPT_CALLBACK_REASON_PRE, NULL, NULL, opt->descrip);
- /*@=moduncon@*/
+ /*@=moduncon =noeffectuncon @*/
}
}
}
@@ -90,9 +90,9 @@ static void invokeCallbacksPOST(poptContext con, const struct poptOption * opt)
poptCallbackType cb = (poptCallbackType)opt->arg;
/*@=castfcnptr@*/
/* Perform callback. */
- /*@-moduncon@*/
+ /*@-moduncon -noeffectuncon @*/
cb(con, POPT_CALLBACK_REASON_POST, NULL, NULL, opt->descrip);
- /*@=moduncon@*/
+ /*@=moduncon =noeffectuncon @*/
}
}
}
@@ -130,10 +130,10 @@ static void invokeCallbacksOPTION(poptContext con,
const void * cbData = (cbopt->descrip ? cbopt->descrip : myData);
/* Perform callback. */
if (cb != NULL) { /* XXX program error */
- /*@-moduncon@*/
+ /*@-moduncon -noeffectuncon @*/
cb(con, POPT_CALLBACK_REASON_OPTION, myOpt,
con->os->nextArg, cbData);
- /*@=moduncon@*/
+ /*@=moduncon =noeffectuncon @*/
}
/* Terminate (unless explcitly continuing). */
if (!(cbopt->argInfo & POPT_CBFLAG_CONTINUE))
@@ -160,7 +160,7 @@ poptContext poptGetContext(const char * name, int argc, const char ** argv,
if (!(flags & POPT_CONTEXT_KEEP_FIRST))
con->os->next = 1; /* skip argv[0] */
- con->leftovers = calloc( (argc + 1), sizeof(char *) );
+ con->leftovers = calloc( (argc + 1), sizeof(*con->leftovers) );
/*@-dependenttrans -assignexpose@*/ /* FIX: W2DO? */
con->options = options;
/*@=dependenttrans =assignexpose@*/
@@ -510,6 +510,7 @@ static const char * findNextArg(/*@special@*/ poptContext con,
if (os->next == os->argc && os == con->optionStack) break;
if (os->argv != NULL)
for (i = os->next; i < os->argc; i++) {
+ /*@-sizeoftype@*/
if (os->argb && PBM_ISSET(i, os->argb))
/*@innercontinue@*/ continue;
if (*os->argv[i] == '-')
@@ -523,6 +524,7 @@ static const char * findNextArg(/*@special@*/ poptContext con,
PBM_SET(i, os->argb);
}
/*@innerbreak@*/ break;
+ /*@=sizeoftype@*/
}
if (os > con->optionStack) os--;
} while (arg == NULL);
@@ -583,10 +585,12 @@ static void poptStripArg(/*@special@*/ poptContext con, int which)
/*@defines con->arg_strip @*/
/*@modifies con @*/
{
+ /*@-sizeoftype@*/
if (con->arg_strip == NULL)
con->arg_strip = PBM_ALLOC(con->optionStack[0].argc);
if (con->arg_strip != NULL) /* XXX can't happen */
PBM_SET(which, con->arg_strip);
+ /*@=sizeoftype@*/
}
static int poptSaveLong(const struct poptOption * opt, long aLong)
@@ -678,10 +682,12 @@ int poptGetNextOpt(poptContext con)
char * localOptString, * optString;
int thisopt;
+ /*@-sizeoftype@*/
if (con->os->argb && PBM_ISSET(con->os->next, con->os->argb)) {
con->os->next++;
continue;
}
+ /*@=sizeoftype@*/
thisopt = con->os->next;
if (con->os->argv != NULL) /* XXX can't happen */
origOptString = con->os->argv[con->os->next++];
@@ -1169,6 +1175,7 @@ int poptStrippedArgv(poptContext con, int argc, char ** argv)
int j = 1;
int i;
+ /*@-sizeoftype@*/
if (con->arg_strip)
for (i = 1; i < argc; i++) {
if (PBM_ISSET(i, con->arg_strip))
@@ -1181,6 +1188,7 @@ int poptStrippedArgv(poptContext con, int argc, char ** argv)
argv[j] = (j < numargs) ? argv[i] : NULL;
j++;
}
+ /*@=sizeoftype@*/
return numargs;
}