audit-userspace icon indicating copy to clipboard operation
audit-userspace copied to clipboard

-Wformat-y2k warnings

Open neheb opened this issue 1 year ago • 2 comments

GCC warns on usage of %x in the codebase.

neheb avatar Jun 10 '24 21:06 neheb

Where?

stevegrubb avatar Jun 12 '24 16:06 stevegrubb

Everywhere honestly. I was going to make a patch but too many locations.

neheb avatar Jun 12 '24 17:06 neheb

I don't see the -Wformat-y2k option explicitly being used in the project. Can you provide what Compiler flags are you using? Also what warnings do you see.

Cropi avatar Jul 08 '24 13:07 Cropi

Had a couple minutes to look at this. With -Wformat=2, we get "‘%x’ yields only last 2 digits of year in some locales". %x is the preferred date representation for the current locale. If the locale prefers to have 2 digit years, should I do anything about that? I want the formatting to be localized so that it matches the norms wherever people are. I don't think we worry about this warning.

stevegrubb avatar Jul 26 '24 20:07 stevegrubb

Thanks for the report. But I think we're going to choose to not worry about this at this time. Closing this.

stevegrubb avatar Aug 03 '24 16:08 stevegrubb