Don't implicitly discard const

As poptGetOptArg() returns "const char *", assigning it to a
"const char *" varible triggers a warning on Clang:
"incompatible-pointer-types-discards-qualifiers".
This commit is contained in:
joerichey@google.com
2018-07-06 12:01:54 -07:00
committed by Milan Broz
parent d7b9ed05f0
commit e8b6890318

View File

@@ -2222,10 +2222,10 @@ int main(int argc, const char **argv)
while((r = poptGetNextOpt(popt_context)) > 0) {
unsigned long long ull_value;
char *endp, *kf;
char *endp;
if (r == 6) {
kf = poptGetOptArg(popt_context);
const char *kf = poptGetOptArg(popt_context);
if (tools_is_stdin(kf))
opt_keyfile_stdin = kf;
else if (opt_keyfiles_count < MAX_KEYFILES)