Notice: We have migrated to GitLab launching 2024-05-01 see here:

#4833 assigned defect

grlib/pci/grpci2dma.c Warnings Require Insight to Resolve Properly

Reported by: Joel Sherrill Owned by: Daniel Hellstrom
Priority: normal Milestone: 6.1
Component: arch/sparc Version: 6
Severity: normal Keywords:
Cc: Blocked By:


These are warnings which may be new from gcc 12. It will take someone more knowledgeable about this driver to fix it.

../../../bsps/shared/grlib/pci/grpci2dma.c: In function 'grpci2dma_channel_list_remove':
../../../bsps/shared/grlib/pci/grpci2dma.c:363:25: warning: 'curr_chan' may be used uninitialized [-Wmaybe-uninitialized]
  363 |                         grpci2dma_channel_bd_set_next(curr_chan, new_first_chan);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../bsps/shared/grlib/pci/grpci2dma.c:351:41: note: 'curr_chan' was declared here
  351 |                 struct grpci2_bd_chan * curr_chan;
      |                                         ^~~~~~~~~
../../../bsps/shared/grlib/pci/grpci2dma.c: In function 'grpci2dma_status':
../../../bsps/shared/grlib/pci/grpci2dma.c:1769:16: warning: 'status' may be used uninitialized [-Wmaybe-uninitialized]
 1769 |         return status;
      |                ^~~~~~
../../../bsps/shared/grlib/pci/grpci2dma.c:1756:13: note: 'status' was declared here
 1756 |         int status;
      |             ^~~~~~

Change History (1)

comment:1 Changed on 06/22/23 at 21:21:20 by Joel Sherrill

Daniel.. can someone from Gaisler look into this? Thanks.

Note: See TracTickets for help on using tickets.