Commit a84c4308 authored by Damien Le Moal's avatar Damien Le Moal Committed by Mike Snitzer

dm verity: Fix compilation warning

For the case !CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG, declare the
functions verity_verify_root_hash(), verity_verify_is_sig_opt_arg(),
verity_verify_sig_parse_opt_args() and verity_verify_sig_opts_cleanup()
as inline to avoid a "no previous prototype for xxx" compilation
warning when compiling with W=1.
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 8e225f04
...@@ -34,25 +34,25 @@ void verity_verify_sig_opts_cleanup(struct dm_verity_sig_opts *sig_opts); ...@@ -34,25 +34,25 @@ void verity_verify_sig_opts_cleanup(struct dm_verity_sig_opts *sig_opts);
#define DM_VERITY_ROOT_HASH_VERIFICATION_OPTS 0 #define DM_VERITY_ROOT_HASH_VERIFICATION_OPTS 0
int verity_verify_root_hash(const void *data, size_t data_len, static inline int verity_verify_root_hash(const void *data, size_t data_len,
const void *sig_data, size_t sig_len) const void *sig_data, size_t sig_len)
{ {
return 0; return 0;
} }
bool verity_verify_is_sig_opt_arg(const char *arg_name) static inline bool verity_verify_is_sig_opt_arg(const char *arg_name)
{ {
return false; return false;
} }
int verity_verify_sig_parse_opt_args(struct dm_arg_set *as, struct dm_verity *v, static inline int verity_verify_sig_parse_opt_args(struct dm_arg_set *as,
struct dm_verity_sig_opts *sig_opts, struct dm_verity *v, struct dm_verity_sig_opts *sig_opts,
unsigned int *argc, const char *arg_name) unsigned int *argc, const char *arg_name)
{ {
return -EINVAL; return -EINVAL;
} }
void verity_verify_sig_opts_cleanup(struct dm_verity_sig_opts *sig_opts) static inline void verity_verify_sig_opts_cleanup(struct dm_verity_sig_opts *sig_opts)
{ {
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment