#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 Dec 3, 2006 at 1:31:13 PM.
termios.patch

Download all attachments as: .zip

Change History (4)

comment:1 Changed on Mar 19, 2002 at 4:04:49 PM by Ralf Corsepius

Status: assignedclosed

comment:2 Changed on Mar 20, 2002 at 4:58:53 PM by Joel Sherrill

Status: closedassigned

comment:3 Changed on Mar 20, 2002 at 4:59:46 PM by Joel Sherrill

Status: assignedclosed

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

Changed on Dec 3, 2006 at 1:31:13 PM by Ralf Corsepius

Attachment: termios.patch added

termios.patch

Note: See TracTickets for help on using tickets.