> This doesn't fix any bugs, right? It merely pacifies 'gcc -Wformat=2
> -Wformat-nonliteral'.

Correct, it fixes no bug.  I confirmed your reasoning against the code:
inzsub() rejects any FORMAT whose '%' isn't followed by 's' or 'z', with
no second '%', and the '%z' case is rewritten to '%s' before doabbr()
runs.  So format always holds at most one '%s' and letters is a plain
string; sprintf can't overflow abbr.  It's a false positive, as you say.

> By my count there are eight other false positives in tzcode [...] This
> suggests that it's better to not use -Wformat-nonliteral.

Agreed — given that ratio, dropping -Wformat-nonliteral is the better
response than open-coding the expansion here, and it keeps this line
readable.  Please drop the patch; sorry for the noise.

Reply via email to