lint warning "function actually returns double" 
Author Message
 lint warning "function actually returns double"

Can somebody explain to me why I keep getting the lint warning

    /usr/local/include/some_file.h (as included in any_file.c)
    =================
    warning: function actually returns double: some_func

while the function really is declared as

    float some_func(void);

in the header file?

Thanks in advance,
Marco



Sun, 07 Sep 1997 17:52:43 GMT  
 lint warning "function actually returns double"

Quote:
>Can somebody explain to me why I keep getting the lint warning

>    /usr/local/include/some_file.h (as included in any_file.c)
>    =================
>    warning: function actually returns double: some_func

>while the function really is declared as

>    float some_func(void);

>in the header file?

Because your lint understands "extended" K&R C, and in K&R C a function
cannot return float.  Even an ANSI C compiler could return a double
instead of a float, your program will never be able to tell the difference.

Dan
--
Dan Pop
CERN, CN Division

Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland



Sun, 07 Sep 1997 19:14:20 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Function without a "return type"?

2. WinSock function "connect" returns unknown error

3. Q : What is returned by "return;"

4. "lint" for windows 95/NT

5. ANSI C / "old" C / lint

6. lint question - how to "import" VARARGS

7. Weird "lint -C" behavior

8. Request "lint" tool for SUN OS

9. ANSI-C "lint" utility

10. "lint" for Win32

11. "lint" programs for VB and VC

12. pass "double *const *" ptr to fn expecting "const double *const *"

 

 
Powered by phpBB® Forum Software