summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-02-25 11:03:38 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-02-25 11:03:38 +0200
commit2b39ddc25d9773c793c4ceaef01de0b9df0c06ad (patch)
treeb5400caa1c4291f4135ead533da507df8baeefe5 /rpmio
parentc46876daa4358849de73a059d944f753a7584013 (diff)
downloadrpm-2b39ddc25d9773c793c4ceaef01de0b9df0c06ad.tar.gz
rpm-2b39ddc25d9773c793c4ceaef01de0b9df0c06ad.tar.bz2
rpm-2b39ddc25d9773c793c4ceaef01de0b9df0c06ad.zip
Enable variadic checks for rpmExpand(), rpmlog() and rpmGetPath()
Suggested by Michal Marek
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/rpmfileutil.h3
-rw-r--r--rpmio/rpmlog.h4
-rw-r--r--rpmio/rpmmacro.h4
3 files changed, 8 insertions, 3 deletions
diff --git a/rpmio/rpmfileutil.h b/rpmio/rpmfileutil.h
index 54d151ed9..7c3648459 100644
--- a/rpmio/rpmfileutil.h
+++ b/rpmio/rpmfileutil.h
@@ -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.
diff --git a/rpmio/rpmlog.h b/rpmio/rpmlog.h
index d3f42ac6b..0766086f4 100644
--- a/rpmio/rpmlog.h
+++ b/rpmio/rpmlog.h
@@ -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.
diff --git a/rpmio/rpmmacro.h b/rpmio/rpmmacro.h
index 802fd4b1f..572a1e7dd 100644
--- a/rpmio/rpmmacro.h
+++ b/rpmio/rpmmacro.h
@@ -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.