summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <jbj>2003-11-23 16:25:06 +0000
committerjbj <jbj>2003-11-23 16:25:06 +0000
commit941aa57776b06b48006e33f74c648634d9d2cda1 (patch)
treebcef5919eff53dc08b834c9839bb1e09714857a3
parent00b8b05d315712761f8e6c6acc414b68d140c679 (diff)
downloadlibpopt-rpm-4_2_1-release.tar.gz
- splint fiddles.rpm-4_2_1-release
-rw-r--r--.splintrc3
-rw-r--r--popt.h30
-rw-r--r--popthelp.c2
-rw-r--r--system.h6
4 files changed, 27 insertions, 14 deletions
diff --git a/.splintrc b/.splintrc
index c14d548..e027765 100644
--- a/.splintrc
+++ b/.splintrc
@@ -3,7 +3,6 @@
#+partial
+forcehints
--warnunixlib
-warnposix
+unixlib
@@ -17,13 +16,11 @@
-bufferoverflowhigh
# --- +partial artifacts
--fcnuse # 7
# --- not-yet at strict level
-bitwisesigned # 75
-elseifcomplete # 18
-exportfcn # 25
--globs # 12 <ctype.h>
-ifblock # 202
-namechecks # 206
-ptrarith # 43
diff --git a/popt.h b/popt.h
index 7c84f30..70f0fab 100644
--- a/popt.h
+++ b/popt.h
@@ -228,7 +228,8 @@ typedef void (*poptCallbackType) (poptContext con,
* @param flags or'd POPT_CONTEXT_* bits
* @return initialized popt context
*/
-/*@only@*/ /*@null@*/ poptContext poptGetContext(
+/*@only@*/ /*@null@*/
+poptContext poptGetContext(
/*@dependent@*/ /*@keep@*/ const char * name,
int argc, /*@dependent@*/ /*@keep@*/ const char ** argv,
/*@dependent@*/ /*@keep@*/ const struct poptOption * options,
@@ -257,7 +258,8 @@ int poptGetNextOpt(/*@null@*/poptContext con)
* @param con context
* @return option argument, NULL if no argument is available
*/
-/*@observer@*/ /*@null@*/ const char * poptGetOptArg(/*@null@*/poptContext con)
+/*@observer@*/ /*@null@*/ /*@unused@*/
+const char * poptGetOptArg(/*@null@*/poptContext con)
/*@modifies con @*/;
/** \ingroup popt
@@ -265,7 +267,8 @@ int poptGetNextOpt(/*@null@*/poptContext con)
* @param con context
* @return next argument, NULL if no argument is available
*/
-/*@observer@*/ /*@null@*/ const char * poptGetArg(/*@null@*/poptContext con)
+/*@observer@*/ /*@null@*/ /*@unused@*/
+const char * poptGetArg(/*@null@*/poptContext con)
/*@modifies con @*/;
/** \ingroup popt
@@ -273,7 +276,8 @@ int poptGetNextOpt(/*@null@*/poptContext con)
* @param con context
* @return current argument, NULL if no argument is available
*/
-/*@observer@*/ /*@null@*/ const char * poptPeekArg(/*@null@*/poptContext con)
+/*@observer@*/ /*@null@*/ /*@unused@*/
+const char * poptPeekArg(/*@null@*/poptContext con)
/*@*/;
/** \ingroup popt
@@ -281,7 +285,8 @@ int poptGetNextOpt(/*@null@*/poptContext con)
* @param con context
* @return argument array, NULL terminated
*/
-/*@observer@*/ /*@null@*/ const char ** poptGetArgs(/*@null@*/poptContext con)
+/*@observer@*/ /*@null@*/
+const char ** poptGetArgs(/*@null@*/poptContext con)
/*@modifies con @*/;
/** \ingroup popt
@@ -290,7 +295,8 @@ int poptGetNextOpt(/*@null@*/poptContext con)
* @param flags
* @return offending option
*/
-/*@observer@*/ const char * poptBadOption(/*@null@*/poptContext con, int flags)
+/*@observer@*/
+const char * poptBadOption(/*@null@*/poptContext con, int flags)
/*@*/;
/** \ingroup popt
@@ -298,7 +304,8 @@ int poptGetNextOpt(/*@null@*/poptContext con)
* @param con context
* @return NULL always
*/
-/*@null@*/ poptContext poptFreeContext( /*@only@*/ /*@null@*/ poptContext con)
+/*@null@*/
+poptContext poptFreeContext( /*@only@*/ /*@null@*/ poptContext con)
/*@modifies con @*/;
/** \ingroup popt
@@ -307,6 +314,7 @@ int poptGetNextOpt(/*@null@*/poptContext con)
* @param argv argument array, NULL terminated
* @return 0 on success, POPT_ERROR_OPTSTOODEEP on failure
*/
+/*@unused@*/
int poptStuffArgs(poptContext con, /*@keep@*/ const char ** argv)
/*@modifies con @*/;
@@ -350,6 +358,7 @@ int poptReadConfigFile(poptContext con, const char * fn)
* @param useEnv (unused)
* @return 0 on success, POPT_ERROR_ERRNO on failure
*/
+/*@unused@*/
int poptReadDefaultConfig(poptContext con, /*@unused@*/ int useEnv)
/*@globals fileSystem, internalState @*/
/*@modifies con->execs, con->numExecs,
@@ -443,7 +452,8 @@ int poptConfigFileToString(FILE *fp, /*@out@*/ char ** argstrp, int flags)
* @param error popt error
* @return error string
*/
-/*@observer@*/ const char *const poptStrerror(const int error)
+/*@observer@*/
+const char *const poptStrerror(const int error)
/*@*/;
/** \ingroup popt
@@ -452,6 +462,7 @@ int poptConfigFileToString(FILE *fp, /*@out@*/ char ** argstrp, int flags)
* @param path single path to search for executables
* @param allowAbsolute absolute paths only?
*/
+/*@unused@*/
void poptSetExecPath(poptContext con, const char * path, int allowAbsolute)
/*@modifies con @*/;
@@ -491,7 +502,8 @@ void poptSetOtherOptionHelp(poptContext con, const char * text)
* @return argv[0]
*/
/*@-fcnuse@*/
-/*@observer@*/ const char * poptGetInvocationName(poptContext con)
+/*@observer@*/
+const char * poptGetInvocationName(poptContext con)
/*@*/;
/*@=fcnuse@*/
diff --git a/popthelp.c b/popthelp.c
index 536fefd..4dd2956 100644
--- a/popthelp.c
+++ b/popthelp.c
@@ -327,9 +327,11 @@ static void singleOptionHelp(FILE * fp, int maxLeftCol,
}
left = _free(left);
+/*@-branchstate@*/
if (defs) {
help = defs; defs = NULL;
}
+/*@=branchstate@*/
helpLength = strlen(help);
/*@-boundsread@*/
diff --git a/system.h b/system.h
index 1d1b9da..df6d3cb 100644
--- a/system.h
+++ b/system.h
@@ -37,7 +37,8 @@ extern __const __int32_t *__ctype_toupper;
#if defined(__LCLINT__)
/*@-declundef -incondefs -redecl@*/ /* LCL: missing annotation */
-/*@only@*/ void * alloca (size_t __size)
+/*@only@*/
+void * alloca (size_t __size)
/*@ensures MaxSet(result) == (__size - 1) @*/
/*@*/;
/*@=declundef =incondefs =redecl@*/
@@ -61,7 +62,8 @@ char *alloca ();
#endif
/*@-redecl -redef@*/
-/*@mayexit@*/ /*@only@*/ char * xstrdup (const char *str)
+/*@mayexit@*/ /*@only@*/ /*@unused@*/
+char * xstrdup (const char *str)
/*@*/;
/*@=redecl =redef@*/