Summary: | Poppler should not give compile time warnings | ||
---|---|---|---|
Product: | poppler | Reporter: | Hib Eris <hib> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
patch-1-Fix_compile_warning_about_uninitialized_variable
patch-2-Fix_compile_warning_on_format_type patch-3-Fix_compile_warnings_on_signed-unsigned_comparison patch-4-Fix_compile_warning_on_format_not_a_string_literal patch-5-Fix_compile_warning_on_ambiguous_else patch-6-Fix_warning_to_suggest_parentheses_inside_shift patch-7-Fix_compile_warning_to_suggest_parentheses_and-or new-patch-3-Fix_compile_warnings_on_signed-unsigned_comparison |
Description
Hib Eris
2008-12-21 07:51:59 UTC
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.