YALF (yet another lint foulup)

James Logan III logan at vsedev.VSE.COM
Fri Dec 16 12:15:53 AEST 1988


In article <4700030 at m.cs.uiuc.edu> wsmith at m.cs.uiuc.edu writes:
# 
# Lint believes this simple program has both return(e); and just return;
# 
# function()
# {
# 	int flag;
# 	do{
# 		return(3);
# 	} while(flag);
# }
# 
# I suppose this should be added to the canonical collection of lint foulups.

The function itself is a foulup.  First, you haven't initialized
"flag", and second, the function can be replaced with:  

	#define function()	3

What's the point?  Returning from the middle of a loop is poor
programming!

			-Jim
-- 
Jim Logan		logan at vsedev.vse.com
(703) 892-0002		uucp:	..!uunet!vsedev!logan
			inet:	logan%vsedev.vse.com at uunet.uu.net



More information about the Comp.lang.c mailing list