Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Andre Przywara's avatar
    c7d0fd79
    scsi: fix compiler warning with DEBUG and 48bit LBAs · c7d0fd79
    Andre Przywara authored
    
    Commit 2b42c931 ("ahci: support LBA48 data reads for 2+TB drives")
    introduced conditional code which triggers a warning when compiled
    with DEBUG enabled:
    
    In file included from common/cmd_scsi.c:12:0:
    common/cmd_scsi.c: In function 'scsi_read':
    include/common.h:109:4: warning: 'smallblks' may be used uninitialized in this function [-Wmaybe-uninitialized]
    ...
    
    Since this is for debug only, take the easy way and initialize the
    variable explicitly on declaration to avoid the warning.
    (Fix a nearby whitespace error on the way.)
    
    Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
    Signed-off-by: default avatarAndre Przywara <osp@andrep.de>
    c7d0fd79
    History
    scsi: fix compiler warning with DEBUG and 48bit LBAs
    Andre Przywara authored
    
    Commit 2b42c931 ("ahci: support LBA48 data reads for 2+TB drives")
    introduced conditional code which triggers a warning when compiled
    with DEBUG enabled:
    
    In file included from common/cmd_scsi.c:12:0:
    common/cmd_scsi.c: In function 'scsi_read':
    include/common.h:109:4: warning: 'smallblks' may be used uninitialized in this function [-Wmaybe-uninitialized]
    ...
    
    Since this is for debug only, take the easy way and initialize the
    variable explicitly on declaration to avoid the warning.
    (Fix a nearby whitespace error on the way.)
    
    Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
    Signed-off-by: default avatarAndre Przywara <osp@andrep.de>