laforge has uploaded this change for review. ( 
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(-)



  git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/01/42001/1

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;

--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/42001?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I49ca7825ab238333b7d55b0ce5cae5e9e92a2cfb
Gerrit-Change-Number: 42001
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>

Reply via email to