laforge has submitted this change. ( https://gerrit.osmocom.org/c/dahdi-linux/+/42001?usp=email )
Change subject: wctdb24xxp/xhfc.c: Fix uninitialized variable ......................................................................
wctdb24xxp/xhfc.c: Fix uninitialized variable
This fixes a compiler error when building for kernel v6.2:
In function ‘xhfc_getreg’, inlined from ‘b400m_probe’ at dahdi-linux/drivers/dahdi/wctdm24xxp/xhfc.c:2563:7: dahdi-linux/drivers/dahdi/wctdm24xxp/xhfc.c:624:12: error: ‘x’ is used uninitialized [-Werror=uninitialized] 624 | if (*lastreg != (unsigned char)addr) { | ^ dahdi-linux/drivers/dahdi/wctdm24xxp/xhfc.c: In function ‘b400m_probe’: dahdi-linux/drivers/dahdi/wctdm24xxp/xhfc.c:2557:27: note: ‘x’ was declared here 2557 | unsigned char id, x; | ^
Change-Id: I49ca7825ab238333b7d55b0ce5cae5e9e92a2cfb --- M drivers/dahdi/wctdm24xxp/xhfc.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: laforge: Looks good to me, approved; Verified
diff --git a/drivers/dahdi/wctdm24xxp/xhfc.c b/drivers/dahdi/wctdm24xxp/xhfc.c index d37fbd5..3fd2a96 100644 --- a/drivers/dahdi/wctdm24xxp/xhfc.c +++ b/drivers/dahdi/wctdm24xxp/xhfc.c @@ -2554,7 +2554,7 @@
static int b400m_probe(struct wctdm *wc, int modpos) { - unsigned char id, x; + unsigned char id, x = 0; struct b400m *b4; unsigned long flags; int chiprev;