[Freeipa-devel] [PATCHES] Some fixes for the Collection and INI parser

Dmitri Pal dpal at redhat.com
Mon Apr 6 19:57:01 UTC 2009


ack.

Stephen Gallagher wrote:
> 0001, 0002: Fixed whitespace issues with Dmitri's original patch. No
> other changes.
>
> 0003: INI parser wasn't being build (missing from the configure.ac),
> README needed work. Add -Wall to the compile flags.
>
> 0004: Fix a lot of warnings.
>
> BEFORE 0004:
> In file included from collection.c:32:
> collection.h:116:1: warning: "/*" within comment
> collection.h:148:1: warning: "/*" within comment
> collection.c: In function ‘update_current_item’:
> collection.c:737: warning: unused variable ‘error’
> collection.c: In function ‘get_reference_from_item’:
> collection.c:1471: warning: unused variable ‘error’
> collection.c: In function ‘modify_item’:
> collection.c:1881: warning: unused variable ‘error’
> collection.c: In function ‘grow_stack’:
> collection.c:2057: warning: unused variable ‘error’
> collection.c: In function ‘walk_items’:
> collection.c:565: warning: ‘parent’ may be used uninitialized in this
> function
> collection.c: In function ‘add_property’:
> collection.c:306: warning: ‘item’ may be used uninitialized in this function
> In file included from collection_tools.c:28:
> collection.h:116:1: warning: "/*" within comment
> collection.h:148:1: warning: "/*" within comment
> collection_tools.c: In function ‘put_marker’:
> collection_tools.c:308: warning: implicit declaration of function ‘memcpy’
> collection_tools.c:308: warning: incompatible implicit declaration of
> built-in function ‘memcpy’
> In file included from collection_ut.c:28:
> collection.h:116:1: warning: "/*" within comment
> collection.h:148:1: warning: "/*" within comment
> collection_ut.c: In function ‘ref_collection_test’:
> collection_ut.c:37: warning: unused variable ‘found’
> collection_ut.c: In function ‘add_collection_test’:
> collection_ut.c:172: warning: unused variable ‘found’
> collection_ut.c: In function ‘mixed_collection_test’:
> collection_ut.c:440: warning: implicit declaration of function
> ‘print_collection2’
> collection_ut.c:526: warning: pointer targets in passing argument 2 of
> ‘get_collection_class’ differ in signedness
> collection_ut.c:230: warning: unused variable ‘packet’
> In file included from ini_config.c:35:
> ../collection/collection.h:116:1: warning: "/*" within comment
> ../collection/collection.h:148:1: warning: "/*" within comment
> In file included from ../collection/collection_tools.h:27,
>                  from ini_config.c:36:
> ../collection/collection.h:116:1: warning: "/*" within comment
> ../collection/collection.h:148:1: warning: "/*" within comment
> In file included from ini_config.c:38:
> ini_config.h:110:1: warning: "/*" within comment
> ini_config.c: In function ‘ini_to_collection’:
> ini_config.c:169: warning: implicit declaration of function ‘read_line’
> ini_config.c:140: warning: unused variable ‘type’
> ini_config.c: In function ‘config_for_app’:
> ini_config.c:352: warning: unused variable ‘error_file_set’
> ini_config.c: In function ‘read_line’:
> ini_config.c:491: warning: unused variable ‘status’
> ini_config.c: In function ‘print_file_parsing_errors’:
> ini_config.c:684: warning: pointer targets in passing argument 2 of
> ‘get_collection_count’ differ in signedness
> ini_config.c:642: warning: unused variable ‘header’
> ini_config.c: In function ‘get_config_item’:
> ini_config.c:799: warning: statement with no effect
> ini_config.c: In function ‘get_string_config_array’:
> ini_config.c:1123: warning: implicit declaration of function ‘strnlen’
> ini_config.c:1100: warning: unused variable ‘total’
> In file included from ini_config.h:27,
>                  from ini_config_ut.c:25:
> ../collection/collection.h:116:1: warning: "/*" within comment
> ../collection/collection.h:148:1: warning: "/*" within comment
> In file included from ini_config_ut.c:25:
> ini_config.h:110:1: warning: "/*" within comment
> In file included from ../collection/collection_tools.h:27,
>                  from ini_config_ut.c:27:
> ../collection/collection.h:116:1: warning: "/*" within comment
> ../collection/collection.h:148:1: warning: "/*" within comment
> ini_config_ut.c: In function ‘negative_test’:
> ini_config_ut.c:120: warning: pointer targets in passing argument 2 of
> ‘get_collection_count’ differ in signedness
> ini_config_ut.c:89: warning: unused variable ‘error_set’
> ini_config_ut.c: In function ‘get_test’:
> ini_config_ut.c:337: warning: implicit declaration of function ‘free’
> ini_config_ut.c:337: warning: incompatible implicit declaration of
> built-in function ‘free’
> ini_config_ut.c:452: warning: format ‘%d’ expects type ‘int’, but
> argument 2 has type ‘long int’
> ini_config_ut.c:492: warning: format ‘%d’ expects type ‘int’, but
> argument 2 has type ‘long unsigned int’
> ini_config_ut.c:512: warning: format ‘%d’ expects type ‘int’, but
> argument 2 has type ‘double’
> ini_config_ut.c:678: warning: format ‘%d’ expects type ‘int’, but
> argument 2 has type ‘long int’
> ini_config_ut.c:214: warning: unused variable ‘type’
> ini_config_ut.c:212: warning: unused variable ‘iterator’
>
>
>
> AFTER 0004:
> collection.c: In function ‘walk_items’:
> collection.c:565: warning: ‘parent’ may be used uninitialized in this
> function
>
> The remaining warning is a real bug which Dmitri will fix soon. It's a
> rare case that will cause a segfault if a program is trying to walk
> through a complete collection, performing deletes and the first entry
> (which has no parent) needs to be deleted.
>
>
> I am going to ack the first two patches (with the whitespace
> corrections), but I'm not going to push them until someone (preferably
> Dmitri) reviews my two follow-on patches.
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel


-- 
Thank you,
Dmitri Pal

Engineering Manager IPA project,
Red Hat Inc.


-------------------------------
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/




More information about the Freeipa-devel mailing list