summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <jbj>2003-11-23 19:52:37 +0000
committerjbj <jbj>2003-11-23 19:52:37 +0000
commit2cef8529f583ad38a1f7f69aa6fbeea208afa164 (patch)
tree0380eecd55f037b5ef515f7492bc13dee3f342fe
parent39c7287dccff095871eedd946f3c9fbb81372d7f (diff)
downloadlibpopt-2cef8529f583ad38a1f7f69aa6fbeea208afa164.tar.gz
Merge changes from rpm-4.2.1 development.
-rw-r--r--.splintrc3
-rw-r--r--popt.h12
-rw-r--r--popthelp.c3
-rw-r--r--system.h6
4 files changed, 15 insertions, 9 deletions
diff --git a/.splintrc b/.splintrc
index 3f9490c..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 d55c0fe..7be75de 100644
--- a/popt.h
+++ b/popt.h
@@ -229,7 +229,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,
@@ -258,7 +259,7 @@ int poptGetNextOpt(/*@null@*/poptContext con)
* @param con context
* @return option argument, NULL if no argument is available
*/
-/*@observer@*/ /*@null@*/
+/*@observer@*/ /*@null@*/ /*@unused@*/
const char * poptGetOptArg(/*@null@*/poptContext con)
/*@modifies con @*/;
@@ -267,7 +268,7 @@ const char * poptGetOptArg(/*@null@*/poptContext con)
* @param con context
* @return next argument, NULL if no argument is available
*/
-/*@observer@*/ /*@null@*/
+/*@observer@*/ /*@null@*/ /*@unused@*/
const char * poptGetArg(/*@null@*/poptContext con)
/*@modifies con @*/;
@@ -276,7 +277,7 @@ const char * poptGetArg(/*@null@*/poptContext con)
* @param con context
* @return current argument, NULL if no argument is available
*/
-/*@observer@*/ /*@null@*/
+/*@observer@*/ /*@null@*/ /*@unused@*/
const char * poptPeekArg(/*@null@*/poptContext con)
/*@*/;
@@ -314,6 +315,7 @@ poptContext poptFreeContext( /*@only@*/ /*@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 @*/;
@@ -357,6 +359,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,
@@ -460,6 +463,7 @@ const char *const poptStrerror(const int error)
* @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 @*/;
diff --git a/popthelp.c b/popthelp.c
index c7dd151..8d4ab6a 100644
--- a/popthelp.c
+++ b/popthelp.c
@@ -54,6 +54,9 @@ struct poptOption poptAliasOptions[] = {
/*@-castfcnptr@*/
/*@observer@*/ /*@unchecked@*/
struct poptOption poptHelpOptions[] = {
+/*@-readonlytrans@*/
+ { NULL, '\0', POPT_ARG_INTL_DOMAIN, PACKAGE, 0, NULL, NULL},
+/*@=readonlytrans@*/
{ NULL, '\0', POPT_ARG_CALLBACK, (void *)&displayArgs, '\0', NULL, NULL },
{ "help", '?', 0, NULL, '?', N_("Show this help message"), NULL },
{ "usage", '\0', 0, NULL, 'u', N_("Display brief usage message"), NULL },
diff --git a/system.h b/system.h
index 685860c..c3d46cb 100644
--- a/system.h
+++ b/system.h
@@ -37,7 +37,8 @@ extern __const __int32_t *__ctype_toupper;
#if defined(__LCLINT__)
/*@-declundef -incondefs @*/ /* LCL: missing annotation */
-/*@only@*/ /*@out@*/ void * alloca (size_t __size)
+/*@only@*/ /*@out@*/
+void * alloca (size_t __size)
/*@ensures MaxSet(result) == (__size - 1) @*/
/*@*/;
/*@=declundef =incondefs @*/
@@ -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@*/