#143 closed defect (fixed)

termiostypes.h voilatile theBuf

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: low Milestone: 2
Component: score Version: unknown
Severity: major Keywords:
Cc: bugs@…, ralf.corsepius@… Blocked By:
Blocking:

Description

c/src/lib/include/rtems/termiostypes.h contains this struct:

struct rtems_termios_rawbuf {

volatile char *theBuf;
volatile unsigned int Head;
volatile unsigned int Tail;
volatile unsigned int Size;
rtems_id Semaphore;

};

When compiling termios.c, gcc warns about discarding qualifiers:
../../../../../../../rtems.work/c/src/lib/libc/termios.c: In function `rtems_termios_close':
../../../../../../../rtems.work/c/src/lib/libc/termios.c:441: warning: passing arg 1 of `free' discards qualifiers from pointer target type
../../../../../../../rtems.work/c/src/lib/libc/termios.c:442: warning: passing arg 1 of `free' discards qualifiers from pointer target type

The relevant parts of termios.c gcc complains about, contain
free(...theBuf).
=> gcc complains about freeing a pointer to volatile memory.

Release:
CVS

Environment:
Any

Attachments (1)

termios.patch (858 bytes) - added by Ralf Corsepius on 12/03/06 at 13:31:13.
termios.patch

Download all attachments as: .zip

Change History (4)

comment:1 Changed on 03/19/02 at 16:04:49 by Ralf Corsepius

Status: assignedclosed

comment:2 Changed on 03/20/02 at 16:58:53 by Joel Sherrill

Status: closedassigned

comment:3 Changed on 03/20/02 at 16:59:46 by Joel Sherrill

Status: assignedclosed

State-Changed-From-To: analyzed->closed
State-Changed-Why: patch committed

Changed on 12/03/06 at 13:31:13 by Ralf Corsepius

Attachment: termios.patch added

termios.patch

Note: See TracTickets for help on using tickets.