#1940 closed defect (fixed)

Console_Port_Tbl: initialization from incompatible pointer type

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.11
Severity: major Keywords:
Cc: jennifer.averett@… Blocked By:
Blocking:

Description

Building RTEMS currently raises this kind of warnings (The exact location varies between targets/BSPs, c.f. below):
...
../../../../../c/src/libchip/serial/ns16550.c:206:20: warning: initialization from incompatible pointer type [enabled by default]
...

The spots GCC warns about all look like this:
...
console_tbl *c = &Console_Port_Tbl [minor];
...

From what I can gather, these all should be
console_tbl *c = Console_Port_Tbl [minor];

Provided some of these spots have undergone such conversion in the
2011-10-18 "dynamic console" patch, I am assuming some may have been missed.

Candidate places to look into (hard to verify due to the excessive number of defines being involved):

# grep -n 'console_tbl.*Console_Port_Tbl' c/src/libchip/serial/ns16550.c
175: console_tbl *c = Console_Port_Tbl [minor];
206: console_tbl *c = &Console_Port_Tbl [minor];
229: console_tbl *c = Console_Port_Tbl [minor];
488: console_tbl *c = Console_Port_Tbl [minor];
547: console_tbl *c = Console_Port_Tbl [minor];
604: console_tbl *c = &Console_Port_Tbl [minor];
664: console_tbl *c = &Console_Port_Tbl [minor];
677: console_tbl *c = &Console_Port_Tbl [minor];

Attachments (1)

console.patch (1.4 KB) - added by Ralf Corsepius on Oct 20, 2011 at 10:47:40 AM.
patch

Download all attachments as: .zip

Change History (5)

comment:1 Changed on Oct 20, 2011 at 2:12:38 AM by Ralf Corsepius

Cc: Jennifer Averett added

Changed on Oct 20, 2011 at 10:47:40 AM by Ralf Corsepius

Attachment: console.patch added

patch

comment:2 Changed on Oct 20, 2011 at 10:48:22 AM by Ralf Corsepius

Resolution: fixed
Status: newclosed

Closing

comment:3 Changed on Nov 23, 2014 at 3:50:06 PM by Gedare Bloom

Version: unknown4.11

Set version based on title name, these seem obviously to only affect 4.11

comment:4 Changed on Oct 10, 2017 at 6:35:44 AM by Sebastian Huber

Component: miscunspecified
Note: See TracTickets for help on using tickets.