Details
-
Bug
-
Resolution: Fixed
-
Trivial
-
Lustre 2.7.0
-
None
-
Build on Ubuntu 15.04, static analysis check build with current cppcheck
-
4
-
9223372036854775807
Description
cppcheck found an incorrect format string being used for a short type:
Checking lustre/quota/lquota_entry.c...
[lustre/quota/lquota_entry.c:219]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'short'.
struct lquota_site *lquota_site_alloc(const struct lu_env *env, void *parent,
bool is_master, short qtype,
struct lquota_entry_operations *ops)
...
sprintf(hashname, "LQUOTA_HASH%u", qtype);
needs to be %hu (or %hd)
Landed for 2.8