open-power / pdbg

PowerPC FSI Debugger
Apache License 2.0
16 stars 39 forks source link

Fix build with -DNDEBUG #55

Closed ffontaine closed 3 years ago

ffontaine commented 3 years ago

Fixe the following build failures with -DNDEBUG:

libpdbg/adu.c: In function 'blog2':
libpdbg/adu.c:112:1: error: control reaches end of non-void function [-Werror=return-type]
  112 | }
      | ^
  CC       libpdbg/libpdbg_la-chip.lo
  CC       libpdbg/libpdbg_la-cronus.lo
libpdbg/cfam.c: In function 'cfam_hmfsi_probe':
libpdbg/cfam.c:325:13: error: 'port' is used uninitialized in this function [-Werror=uninitialized]
  325 |  value |= 1 << (31 - port);
      |           ~~^~~~~~~~~~~~~~

Fixes:

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

shenki commented 3 years ago

Thanks for the patch! I've asked @amitay to take a look.