Bugzilla – Bug 132484
lkcdutils-4.2-207: 2 * local variable used before set
Last modified: 2006-03-09 12:13:02 UTC
Hello there, I just tried to compile package lkcdutils-4.2-207 with the Intel C compiler. It said 1. cmd_whatis.c(217): warning #592: variable "flags" is used before its value is set The source code is kl_print_type((void *)NULL, kltp, 0, flags|SUPPRESS_NAME, cmd->ofp); I have had a look at the code, and I agree with the compiler. Suggest initialise local variable "flags" before first use. 2. cmd_deftask.c(42): warning #592: variable "task" is used before its value is set The source code is if (KL_ERROR || (task && (mode != 2))) { I have had a look at the code, and I agree with the compiler. Suggest initialise local variable "task" before first use. BTW, the email address of the author, as best as I could figure out [ lucc@sgi.com ] seems to be dead.
Nice, thanks for the feedback. Re issue 1: the local variable "flags" seems to be a relic. Looks like it should go, and the two remaining uses of it should read cmd->flags instead. Re issue 2: this should fix it: - if (KL_ERROR || (task && (mode != 2))) { + if (KL_ERROR || (value && (mode != 2))) {
Fixed with Beta6.