diff options
-rw-r--r-- | .splintrc | 3 | ||||
-rw-r--r-- | popt.h | 30 | ||||
-rw-r--r-- | popthelp.c | 2 | ||||
-rw-r--r-- | system.h | 6 |
4 files changed, 27 insertions, 14 deletions
@@ -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 @@ -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@*/ @@ -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@*/ @@ -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@*/ |