Mercurial > hg > octave-lyh > gnulib-hg
changeset 10702:c1444c2ed476
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.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Wed, 22 Oct 2008 11:07:50 -0700 |
parents | 8666d9b0d37a |
children | e4584e8c5e4b |
files | ChangeLog lib/se-context.in.h lib/se-selinux.in.h |
diffstat | 3 files changed, 48 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-23 Jim Meyering <meyering@redhat.com> + + 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. + 2008-10-22 Simon Josefsson <simon@josefsson.org> * lib/sys_socket.in.h (FD_ISSET): Fix warnings under mingw.
--- 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
--- a/lib/se-selinux.in.h +++ b/lib/se-selinux.in.h @@ -8,41 +8,51 @@ # 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 _UNUSED_PARAMETER_) { errno = ENOTSUP; return -1; } -static inline int setfscreatecon (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 matchpathcon (char const *s, mode_t m, - 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 getfilecon (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 lgetfilecon (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 setfilecon (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 lsetfilecon (char const *s, security_context_t con) - { 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