Bug 132484 - lkcdutils-4.2-207: 2 * local variable used before set
Summary: lkcdutils-4.2-207: 2 * local variable used before set
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Final
Hardware: All SuSE Linux 10.0
: P5 - None : Minor
Target Milestone: ---
Assignee: Hannes Reinecke
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-05 23:14 UTC by David Binderman
Modified: 2006-03-09 12:13 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2005-11-05 23:14:38 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.
Comment 1 Olaf Kirch 2005-11-15 11:45:29 UTC
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))) {
Comment 3 Hannes Reinecke 2006-03-09 12:13:02 UTC
Fixed with Beta6.