kernel_optimize_test/include/keys
ndesaulniers@google.com be24b37e22 KEYS: trusted: fix -Wvarags warning
Fixes the warning reported by Clang:
security/keys/trusted.c:146:17: warning: passing an object that
undergoes default
      argument promotion to 'va_start' has undefined behavior [-Wvarargs]
        va_start(argp, h3);
                       ^
security/keys/trusted.c:126:37: note: parameter of type 'unsigned
char' is declared here
unsigned char *h2, unsigned char h3, ...)
                               ^
Specifically, it seems that both the C90 (4.8.1.1) and C11 (7.16.1.4)
standards explicitly call this out as undefined behavior:

The parameter parmN is the identifier of the rightmost parameter in
the variable parameter list in the function definition (the one just
before the ...). If the parameter parmN is declared with ... or with a
type that is not compatible with the type that results after
application of the default argument promotions, the behavior is
undefined.

Link: https://github.com/ClangBuiltLinux/linux/issues/41
Link: https://www.eskimo.com/~scs/cclass/int/sx11c.html
Suggested-by: David Laight <David.Laight@aculab.com>
Suggested-by: Denis Kenzior <denkenz@gmail.com>
Suggested-by: James Bottomley <jejb@linux.vnet.ibm.com>
Suggested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
2019-04-08 15:58:54 -07:00
..
asymmetric-parser.h
asymmetric-subtype.h KEYS: Provide missing asymmetric key subops for new key type ops [ver #2] 2018-10-26 09:30:46 +01:00
asymmetric-type.h docs: Fix some broken references 2018-06-15 18:10:01 -03:00
big_key-type.h
ceph-type.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dns_resolver-type.h
encrypted-type.h
keyring-type.h
request_key_auth-type.h keys: Fix dependency loop between construction record and auth key 2019-02-15 14:12:09 -08:00
rxrpc-type.h net: rxrpc: Replace time_t type with time64_t type 2017-08-29 10:16:00 +01:00
system_keyring.h integrity, KEYS: add a reference to platform keyring 2019-02-04 17:29:19 -05:00
trusted-type.h tpm: fix checks for policy digest existence in tpm2_seal_trusted() 2016-02-10 04:10:55 +02:00
trusted.h KEYS: trusted: fix -Wvarags warning 2019-04-08 15:58:54 -07:00
user-type.h KEYS: user: Align the payload buffer 2019-02-22 10:11:19 -08:00