• A
    isdn: kcapi: avoid uninitialized data · af109a2c
    Arnd Bergmann 提交于
    gcc-7 points out that the AVMB1_ADDCARD ioctl results in an unintialized
    value ending up in the cardnr parameter:
    
    drivers/isdn/capi/kcapi.c: In function 'old_capi_manufacturer':
    drivers/isdn/capi/kcapi.c:1042:24: error: 'cdef.cardnr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       cparams.cardnr = cdef.cardnr;
    
    This has been broken since before the start of the git history, so
    either the value is not used for anything important, or the ioctl
    command doesn't get called in practice.
    
    Setting the cardnr to zero avoids the warning and makes sure
    we have consistent behavior.
    Signed-off-by: NArnd Bergmann <arnd@arndb.de>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    af109a2c
kcapi.c 29.7 KB