Bug 57352 - source code problems
Summary: source code problems
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sliplogin
Version: 7.1
Hardware: alpha
OS: Linux
medium
low
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-10 18:35 UTC by d.binderman
Modified: 2015-03-05 01:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-12-10 18:35:28 UTC
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2001-12-10 18:35:23 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

In compiling package sliplogin-2.1.1-11 from Redhat 7.1, I got the
following messages from the compiler

1.

cc: Warning: access.c, line 174: The function "access_init" returns a value, but no value is given in this return statement. (noreturnval)
    if (config) return;
----------------^

I guess -1 might be a suitable value to return.

2.

A whole bunch of problems with scanf ...

cc: Warning: statistic.c, line 34: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->rx_bytes,
------------^
cc: Warning: statistic.c, line 35: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->rx_packets,
------------^
cc: Warning: statistic.c, line 36: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->rx_errors,
------------^
cc: Warning: statistic.c, line 37: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->rx_dropped,
------------^
cc: Warning: statistic.c, line 38: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->rx_fifo_errors,
------------^
cc: Warning: statistic.c, line 39: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->rx_frame_errors,
------------^
cc: Warning: statistic.c, line 40: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->rx_compressed,
------------^
cc: Warning: statistic.c, line 41: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->multicast,
------------^
cc: Warning: statistic.c,line 43: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->tx_bytes,
------------^
cc: Warning: statistic.c, line 44: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->tx_packets,
------------^
cc: Warning: statistic.c, line 45: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->tx_errors,
------------^
cc: Warning: statistic.c, line 46: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->tx_dropped,
------------^
cc: Warning: statistic.c, line 47: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->tx_fifo_errors,
------------^
cc: Warning: statistic.c, line 48: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->collisions,
------------^
cc: Warning: statistic.c, line 49: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->tx_carrier_errors,
------------^
cc: Warning: statistic.c, line 50: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
            &stats->tx_compressed) != 16)
------------^
cc: Warning: statistic.c, line 52: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
                    &stats->rx_packets,
--------------------^
cc: Warning: statistic.c, line 53: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
                    &stats->rx_errors,
--------------------^
cc: Warning: statistic.c, line 54: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
                    &stats->rx_dropped,
--------------------^
cc: Warning: statistic.c, line 55: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
                    &stats->rx_fifo_errors,
--------------------^
cc: Warning: statistic.c, line 56: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
                    &stats->rx_frame_errors,
--------------------^
cc: Warning: statistic.c, line 58: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
                    &stats->tx_packets,
--------------------^
cc: Warning: statistic.c, line 59: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
                    &stats->tx_errors,
--------------------^
cc: Warning: statistic.c, line 60: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
                    &stats->tx_dropped,
--------------------^
cc: Warning: statistic.c, line 61: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
                    &stats->tx_fifo_errors,
--------------------^
cc: Warning: statistic.c, line 62: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
                    &stats->collisions,
--------------------^
cc: Warning: statistic.c, line 64: In this statement, this argument to sscanf is of "pointer to unsigned long" type and is not appropriate for 
the 
conversion specifier "%d".  The value may overwrite other data or produce unexpected results. (inptrtype)
                    &stats->tx_carrier_errors
--------------------^

I suspect that the data types and the % specifiers on the scanf
should match up.




Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. compile with Compaq C ccc -w0
2.
3.
	

Additional info:

Comment 1 Phil Knirsch 2002-01-30 09:40:13 UTC
Compiler warnings should are important, i agree, but they are not errors. As
long as they don't result in real errors in the application they can at least be
partially ignored. But if we had to fix all the compiler warnings of all our
packages in our distribution we'd probably have to hire tons of new people. :-)

Thanks for reporting anyway but i'm closing it as NOTABUG as it is a warning,
not a bug :-). If i ever have some spare time i'll be looking at it again.

Read ya, Phil

Comment 2 d.binderman 2002-02-12 19:39:20 UTC
I'm sorry to hear that even though I'm providing exact file names
and line numbers and describing the fault as best I can, 
you are unwilling to fix these minor problems.


Note You need to log in before you can comment on or make changes to this bug.