GNOME Bugzilla – Bug 746030
src/sj-main.c:494: bad if ?
Last modified: 2016-10-10 10:35:12 UTC
src/sj-main.c:494:66: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] if (!sj_str_is_empty (((TrackDetails*) (l->data))->composer) == TRUE) { Maybe if (sj_str_is_empty (((TrackDetails*) (l->data))->composer) != TRUE) { might be better code.
(In reply to dcb from comment #0) > src/sj-main.c:494:66: warning: logical not is only applied to the left hand > side of comparison [-Wlogical-not-parentheses] > > if (!sj_str_is_empty (((TrackDetails*) (l->data))->composer) == TRUE) { I don't know what I was thinking of when I wrote that > Maybe > > if (sj_str_is_empty (((TrackDetails*) (l->data))->composer) != TRUE) { > > might be better code. I think (!sj_str_is_empty (((TrackDetails*) (l->data))->composer)) would be clearest
Created attachment 337189 [details] [review] Simplify conditional Testing for ‘== TRUE’ is confusing, thanks to dcb for reporting this.
Attachment 337189 [details] pushed as 3648a04 - Simplify conditional