#1974 closed defect (fixed)

libchip/display/disp_hcms29xx.c:333:9: warning: variable 'digit' set but not used

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.11
Severity: minor Keywords:
Cc: thomas.doerfler@…, sebastian.huber@…, dunsmoreb@… Blocked By:


GCC raises the warning from the subject.

The code in question condenses down to (c&/src/libchip/display/disp_hcms29xx.c):

static rtems_status_code disp_hcms29xx_send_to_display(

disp_hcms29xx_drv_t *softc_ptr,
const volatile char *disp_buffer


int i,digit,ret_cnt;

digit = (softc_ptr->disp_param.rotate

: i);



I.e. GCC is right on issuing the warning. However, when removing "digit", the
(softc_ptr .... ? :) will remain unused (and raise the next warning from GCC).

All this raises a gut feeling in me, there could be more to this code than "used vars" and something could be wrong/incomplete in this function and lets me hesitate to remove digit and the (?:) statement.

Change History (4)

comment:1 Changed on Nov 30, 2011 at 4:00:25 PM by Ralf Corsepius

Cc: sebastian.huber@… thomas.doerfler@… added

comment:2 Changed on Dec 16, 2013 at 11:12:33 PM by Bryan Dunsmore

Resolution: fixed
Status: newclosed, dunsmoreb@gmail.com

It appears that the issue is now resolved as the variable assignment in question has been removed with commit 64d6f192.

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.