Bug 57352 - source code problems
source code problems
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: sliplogin (Show other bugs)
7.1
alpha Linux
medium Severity low
: ---
: ---
Assigned To: Phil Knirsch
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-10 13:35 EST by d.binderman
Modified: 2015-03-04 20:09 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-12-10 13:35:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2001-12-10 13:35:23 EST
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 04:40:13 EST
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 14:39:20 EST
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.