GNOME Bugzilla – Bug 752049
Fix return value error in camel_imapx_job_inc_update_locked
Last modified: 2015-07-09 14:18:26 UTC
Please see the patch. There is a return value error in camel/providers/imapx/camel-imapx-job.c, function camel_imapx_job_inc_update_locked.
Created attachment 306977 [details] [review]
[PATCH] Bug 752049 - Fix return value error in camel_imapx_job_inc_update_locked
Thanks for a bug report and patch. You are right. I'd like to know why I do not get notified about such issues by the compiler. I get warnings for such silly mistakes in other parts in the code. Weird. In any case, I committed your change.
Created commit bf0b221 in eds master (3.17.4+)
Created commit e1a6568 in eds gnome-3-16 (3.16.4+)
This problem is caught by clang. Clang shows this problem as error, so we can easily find it. GCC may be able to catch the problem using -Wreturn-type, but it seems there are still some kinds of return value error cannot be caught by GCC. I remember that GCC 5 can show warnings for return value problems without adding arguments, but I don't check whether GCC 5 is able to catch all return value problems that clang shows as error by default.
Yeah, GCC is cheating on me in this regard, even with that -Wreturn-type, which I tried earlier today. Bad luck for me.