Enable variadic checks for rpmExpand(), rpmlog() and rpmGetPath()

Suggested by Michal Marek
This commit is contained in:
Panu Matilainen 2008-02-25 11:03:38 +02:00
parent c46876daa4
commit 2b39ddc25d
3 changed files with 8 additions and 3 deletions

View File

@ -6,6 +6,7 @@
* File and path manipulation helper functions.
*/
#include <rpm/rpmutil.h>
#include <rpm/rpmio.h>
#include <rpm/rpmpgp.h>
@ -83,7 +84,7 @@ char * rpmGenPath (const char * urlroot,
* @param path macro(s) to expand (NULL terminates list)
* @return canonicalized path (malloc'ed)
*/
char * rpmGetPath (const char * path, ...);
char * rpmGetPath (const char * path, ...) RPM_GNUC_NULL_TERMINATED;
/** \ingroup rpmfileutil
* Return URL path(s) from a (URL prefixed) pattern glob.

View File

@ -10,6 +10,8 @@
#include <stdarg.h>
#include <stdio.h>
#include <rpm/rpmutil.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -220,7 +222,7 @@ int rpmlogSetMask (int mask);
/** \ingroup rpmlog
* Generate a log message using FMT string and option arguments.
*/
void rpmlog (int code, const char *fmt, ...);
void rpmlog (int code, const char *fmt, ...) RPM_GNUC_PRINTF(2, 3);
/** \ingroup rpmlog
* Return text of last rpmError() message.

View File

@ -8,6 +8,8 @@
#include <stdio.h>
#include <stddef.h>
#include <rpm/rpmutil.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -124,7 +126,7 @@ void rpmFreeMacros (rpmMacroContext mc);
* @param arg macro(s) to expand (NULL terminates list)
* @return macro expansion (malloc'ed)
*/
char * rpmExpand (const char * arg, ...);
char * rpmExpand (const char * arg, ...) RPM_GNUC_NULL_TERMINATED;
/** \ingroup rpmmacro
* Return macro expansion as a numeric value.