Page MenuHomePhabricator

Convert format strings using %u for bools to use %d instead
Closed, ResolvedPublic


As pointed out by @CCulianu , using %u for bools is not good style and may even cause some compilers to issue warnings.
Technically a bool is promoted to an int, not an unsigned int.

There is much of this %u usage going on in existing log trace printing of bools.

A general careful replacement should be done across the codebase.

Event Timeline

Yeah it's just a good habit because some compilers can warn about format types not matching arguments if you tag the function as being a printf-style function.

It's not a huge deal, just something to keep in mind going forward...

I'm in the process of learning the code base, so I'll take a look at this to get started.

@freetrader This task is completed. It doesn't look like I can close it since it's not assigned to me. Please close when you have the chance.

Ah, thank you @jasonbcox . The task is not currently assigned to anyone, but I think anyone can grab it and close it.

Thanks for the changes, I'll close it.

freetrader claimed this task.

Resolved by D605