[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] multipath-tool: gcc warnings



On sam., 2013-01-12 at 18:00 +0100, Xose Vazquez Perez wrote:
> hi,
> 
> I built multipath-tool with -Wextra and gcc shows a lot
> of warnings. But I believe two of them are relevant:
...
> dasd.c:233:4: warning: comparison is always false due to limited range of data type [-Wtype-limits]
> - wrong type

Stephan,

would you approve this patch to the kpartx dasd parser you contributed
back in 2009 ?

diff --git a/kpartx/dasd.h b/kpartx/dasd.h
index 0ed7c80..42f94db 100644
--- a/kpartx/dasd.h
+++ b/kpartx/dasd.h
@@ -68,7 +68,7 @@ typedef struct volume_label
        char res2[4];           /* reserved                                  */
        char lvtoc[14];         /* owner code for LVTOC                      */
        char res3[28];          /* reserved                                  */
-       char ldl_version;       /* version number, valid for ldl format      */
+       uint8_t ldl_version;    /* version number, valid for ldl format      */
        uint64_t formatted_blocks; /* valid when ldl_version >= f2           */
 } __attribute__ ((packed)) volume_label_t;
 

Best regards,
Christophe Varoqui


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]