diff options
author | Jim Meyering <jim@meyering.net> | 2008-10-22 11:07:50 -0700 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-10-23 14:34:12 +0200 |
commit | ce631491e7583f59352bf09c6d18a99914d9e99d (patch) | |
tree | 34fd5baa1d87337e9877831abf14f68c23ea1631 /lib | |
parent | 49577adb63848cfb501199419a1cf838ff139918 (diff) | |
download | gnulib-ce631491e7583f59352bf09c6d18a99914d9e99d.tar.gz |
selinux-h: mark parameters of stub functions as intentionally unused
* lib/se-selinux.in.h: Mark parameters as _UNUSED_PARAMETER_.
* lib/se-context.in.h: Likewise.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/se-context.in.h | 18 | ||||
-rw-r--r-- | lib/se-selinux.in.h | 50 |
2 files changed, 41 insertions, 27 deletions
diff --git a/lib/se-context.in.h b/lib/se-context.in.h index f9fe9237d1..5eb95af22c 100644 --- a/lib/se-context.in.h +++ b/lib/se-context.in.h @@ -4,19 +4,23 @@ # include <errno.h> typedef int context_t; -static inline context_t context_new (char const *s) +static inline context_t context_new (char const *s _UNUSED_PARAMETER_) { errno = ENOTSUP; return 0; } -static inline char *context_str (context_t con) +static inline char *context_str (context_t con _UNUSED_PARAMETER_) { errno = ENOTSUP; return (void *) 0; } -static inline void context_free (context_t c) {} +static inline void context_free (context_t c _UNUSED_PARAMETER_) {} -static inline int context_user_set (context_t sc, char const *s) +static inline int context_user_set (context_t sc _UNUSED_PARAMETER_, + char const *s _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int context_role_set (context_t sc, char const *s) +static inline int context_role_set (context_t sc _UNUSED_PARAMETER_, + char const *s _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int context_range_set (context_t sc, char const *s) +static inline int context_range_set (context_t sc _UNUSED_PARAMETER_, + char const *s _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int context_type_set (context_t sc, char const *s) +static inline int context_type_set (context_t sc _UNUSED_PARAMETER_, + char const *s _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } #endif diff --git a/lib/se-selinux.in.h b/lib/se-selinux.in.h index ce64487200..25cbaaef7f 100644 --- a/lib/se-selinux.in.h +++ b/lib/se-selinux.in.h @@ -8,41 +8,51 @@ typedef unsigned short security_class_t; # define security_context_t char* # define is_selinux_enabled() 0 -static inline int getcon (security_context_t *con) +static inline int getcon (security_context_t *con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline void freecon (security_context_t con) {} +static inline void freecon (security_context_t con _UNUSED_PARAMETER_) {} -static inline int getfscreatecon (security_context_t *con) +static inline int getfscreatecon (security_context_t *con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int setfscreatecon (security_context_t con) +static inline int setfscreatecon (security_context_t con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int matchpathcon (char const *s, mode_t m, - security_context_t *con) +static inline int matchpathcon (char const *s _UNUSED_PARAMETER_, + mode_t m _UNUSED_PARAMETER_, + security_context_t *con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int getfilecon (char const *s, security_context_t *con) +static inline int getfilecon (char const *s _UNUSED_PARAMETER_, + security_context_t *con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int lgetfilecon (char const *s, security_context_t *con) +static inline int lgetfilecon (char const *s _UNUSED_PARAMETER_, + security_context_t *con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int setfilecon (char const *s, security_context_t con) +static inline int setfilecon (char const *s _UNUSED_PARAMETER_, + security_context_t con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int lsetfilecon (char const *s, security_context_t con) +static inline int lsetfilecon (char const *s _UNUSED_PARAMETER_, + security_context_t con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int fsetfilecon (int fd, security_context_t con) +static inline int fsetfilecon (int fd _UNUSED_PARAMETER_, + security_context_t con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int security_check_context (security_context_t con) +static inline int security_check_context + (security_context_t con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int security_check_context_raw (security_context_t con) +static inline int security_check_context_raw + (security_context_t con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int setexeccon (security_context_t con) +static inline int setexeccon (security_context_t con _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int security_compute_create (security_context_t scon, - security_context_t tcon, - security_class_t tclass, - security_context_t *newcon) +static inline int security_compute_create + (security_context_t scon _UNUSED_PARAMETER_, + security_context_t tcon _UNUSED_PARAMETER_, + security_class_t tclass _UNUSED_PARAMETER_, + security_context_t *newcon _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int matchpathcon_init_prefix (char const *path, - char const *prefix) +static inline int matchpathcon_init_prefix + (char const *path _UNUSED_PARAMETER_, + char const *prefix _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } #endif |