Bug 116272 - used before set + arithmetic on void *
used before set + arithmetic on void *
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  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:
Last Closed: 2004-02-19 12:14:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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-

The compiler said


../../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.


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

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:
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.