mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Avoid "gcc -Wunused-parameter" warnings on the generated hash function.
Reported by Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> in <https://savannah.gnu.org/bugs/index.php?64393>. * src/output.cc (Output::output_hash_function): If str is not used, emit a cast from str to void. If len is not used, emit a cast from len to void. * tests/permut2.exp: Update. * tests/permut3.exp: Likewise. * tests/permutc2.exp: Likewise.
This commit is contained in:
@@ -122,6 +122,7 @@ hash (register const char *str, register size_t len)
|
||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
8, 8, 8, 8, 8, 8, 8, 8, 8
|
||||
};
|
||||
(void) len;
|
||||
return asso_values[(unsigned char)str[1]+3] + asso_values[(unsigned char)str[0]];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user