Description of problem: I just tried to compile package gurlchecker-0.6.3-2 from Redhat Fedora Extras development tree. The compiler said 1. application.c(183): remark #592: variable "iter" is used before its value is set The source code is GtkTreeIter iter; uc_application_menu_set_sensitive_all ("display", TRUE); gtk_tree_store_clear (treestore); uc_check_display_list_with_only (uc_lists_checked_links_get (), iter, UC_CHECK_DISPLAY_BADLINKS); I'm not sure what's going on here, but it might be sensible to ensure that iter is set to something sensible before it is given to uc_check_display_list_with_only. 2. application.c(202): remark #592: variable "iter" is used before its value is set application.c(221): remark #592: variable "iter" is used before its value is set application.c(240): remark #592: variable "iter" is used before its value is set Duplicates. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
It's in the nature of the GtkTreeIter struct that often it's passed on to other functions where initialisation happens (call by reference then).
>call by reference then This is C code. The only call by reference is to pass the address of something. It *might* be the case that function uc_check_display_list_with_only is happy to be given rubbish for its second parameter. In general, functions don't like being given rubbish. Suggest either initialise the parameter, or delete the second parameter from the definition of the function.
uc_check_display_list_with_only doesn't care about the struct at all, since it passes it on to a function where it is initialised. Again, where I take a look at reports like this, I'm in search of actual programming mistakes to fix, as they likely cause run-time misbehaviour. Unlike you, I'm not on a quest to only make Intel C Compiler shut up.