This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 116272 - used before set + arithmetic on void *
used before set + arithmetic on void *
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-19 11:39 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-19 12:14:35 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 2004-02-19 11:39:40 EST
Description of problem:

I just tried to compile development package binutils-2.14.90.0.8-4

The compiler said

1.

../../binutils/objcopy.c(2058): warning #1338: arithmetic on pointer
to void or
function type
../../binutils/objcopy.c(2060): warning #1338: arithmetic on pointer
to void or
function type

The source code is

          char *from = memhunk + copy_byte;
          char *to = memhunk;
          char *end = memhunk + size;

Strictly speaking, the compiler is correct. Suggest add cast to char *
for both uses of memhunk.

2.

../../gas/stabs.c(523): remark #592: variable "buf" is used before its
value is
set

The source code is

  char *buf;
  char *tmp = file;
  char *endp = file + strlen (file);
  char *bufp = buf;

Clearly broken code. Suggest init buf before first use.



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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Jakub Jelinek 2004-02-19 12:14:35 EST
I've commited the fix to binutils CVS, but there is no point to
issue any errata about this, as all these warnings are harmless.
In stabs.c there is bufp = buf = a few lines bellow and the variables
aren't used before it appart fromthe bogus initialization and
GCC which is the only compiler we use to build binutils has void *
pointer arithmetics extension.
Thanks for reporting this.

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