Description of problem: I just tried to compile package logjam-4.4.1-3 from Redhat Fedora Extras development tree. The compiler said tools.c(217): remark #592: variable "encoding" is used before its value is set The source code is const gchar *encoding; GError *err = NULL; command = gtk_entry_get_text(GTK_ENTRY(entry)); if (!jam_doc_insert_command_output(doc, command, encoding, &err, win) && (err)) { Suggest initialise local variable "encoding" before first use. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Gcc spit this out? I don't recognize that as a gcc error, it sounds like ICC being too sensitive. If gcc wasn't used to compile this, you need to take that bug back to the upstream maintainer, which, in the case of logjam, is Evan Martin (http://logjam.danga.com). If gcc was used, feel free to reopen this bug.
>Gcc spit this out? Nope, Intel 8.1, but gcc will complain about the line by adding "-O2 -Wall" to gcc command line. >it sounds like ICC being too sensitive. Good comedy. In fact, reading definately un-init memory is one of the oldest mistakes that C programmers. >If gcc was used, feel free to reopen this bug. See above - gcc can complain about this bug.
Created attachment 111958 [details] gcc -Wall warnings cleaned up OK, taking the time to look at this one. Recompiled logjam 4.4.1 with -O2 -Wall. The following errors were thrown by the compiler: cmdline.c: In function `command_dispatch': cmdline.c:667: warning: 'acc' might be used uninitialized in this function checkfriends-gtk.c: In function `cf_float_destroy': checkfriends-gtk.c:258: warning: unused variable `cfm' checkfriends-gtk.c: In function `cf_dock_destroy': checkfriends-gtk.c:280: warning: unused variable `cfm' checkfriends-gtk.c: At top level: checkfriends-gtk.c:295: warning: 'cf_dock_setup' defined but not used menu.c: In function `menu_make_bar': menu.c:443: warning: unused variable `i' tools.c: In function `tools_insert_command_output': tools.c:212: warning: 'encoding' might be used uninitialized in this function All of these errors are fixed in the attached patch.
Changes committed to devel branch of CVS.