Created attachment 21350 [details] [review] patch-1-Fix_compile_warning_about_uninitialized_variable Compiling poppler on Ubuntu, I get lots of warnings from the compiler. I have 7 patches to fix most of these. After these 7 patches, for me the only remaining warnings are about not using the result of fwrite, which are errors that should be fixed in my opinion.
Created attachment 21351 [details] [review] patch-2-Fix_compile_warning_on_format_type
Created attachment 21352 [details] [review] patch-3-Fix_compile_warnings_on_signed-unsigned_comparison
Created attachment 21353 [details] [review] patch-4-Fix_compile_warning_on_format_not_a_string_literal
Created attachment 21354 [details] [review] patch-5-Fix_compile_warning_on_ambiguous_else
Created attachment 21355 [details] [review] patch-6-Fix_warning_to_suggest_parentheses_inside_shift
Created attachment 21356 [details] [review] patch-7-Fix_compile_warning_to_suggest_parentheses_and-or
patch 1 commited
patch 2 is for the glib people, Carlos?
Patch 4 commited
Patch 5 commited
Patch 6 commited
Patch 7 commited.
Most of your patch 3 is wrong, see how int nObjects = INT_MAX; if (nObjects*(int)sizeof(int)/sizeof(int) != nObjects) printf("UEEEEEEE\n"); Warns you that you are about to overflow, but int nObjects = INT_MAX; if (nObjects*(int)sizeof(int)/(int)sizeof(int) != nObjects) printf("UEEEEEEE\n"); does not
All patches commited, except 2 which i'm waiting on input from Carlos and parts of 3 that were wrong.
(In reply to comment #14) > All patches commited, except 2 which i'm waiting on input from Carlos committed 2. > and parts of 3 that were wrong. >
(In reply to comment #13) > Most of your patch 3 is wrong, see how > > int nObjects = INT_MAX; > if (nObjects*(int)sizeof(int)/sizeof(int) != nObjects) > printf("UEEEEEEE\n"); > > Warns you that you are about to overflow, but > > int nObjects = INT_MAX; > if (nObjects*(int)sizeof(int)/(int)sizeof(int) != nObjects) > printf("UEEEEEEE\n"); > > does not > I see... the code did not really make sense to me, now I understand it a little more. I will provide a new patch, please tell me if it is any better.
Created attachment 21405 [details] [review] new-patch-3-Fix_compile_warnings_on_signed-unsigned_comparison
I've commited my own code for fix patch number 3 warnings.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.