multipath-tool: gcc warnings
hi,
I built multipath-tool with -Wextra and gcc shows a lot of warnings. But I believe two of them are relevant:
log_pthread.c:37:3: warning: implicit declaration of function ‘syslog’ [-Wimplicit-function-declaration]
- missing header <syslog.h>
dasd.c:233:4: warning: comparison is always false due to limited range of data type [-Wtype-limits]
- wrong type
Quoted 4 lines · Xose Vazquez Perez
hi,
I built multipath-tool with -Wextra and gcc shows a lot of warnings. But I believe two of them are relevant:
...
Quoted 2 lines
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 ?
kpartx/dasd.h +1 -1
@@ -68,7 +68,7 @@ typedef struct volume_labelchar 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
Christophe Varoqui <[email protected]> wrote on 2013-01-12 20:22:02:
Quoted 31 lines · Xose Vazquez Perez
Quoted 4 lines
hi,
I built multipath-tool with -Wextra and gcc shows a lot of warnings. But I believe two of them are relevant:
...
Quoted 1 line
dasd.c:233:4: warning: comparison is always false due to limited
range of data type [-Wtype-limits]
Quoted 1 line
- wrong type
Stephan,
would you approve this patch to the kpartx dasd parser you contributed back in 2009 ?
kpartx/dasd.h +0
-1@@ -68,7 +68,7 @@ typedef struct volume_labelchar res2[4 ];/* reserved */ char lvtoc[14 ];/* owner code for LVTOC */ char res3[28 ];/* reserved */ -char ldl_version;/* version number, valid for ldl format */
+uint8_tldl_version; /* version number, valid for ldl
format */
uint64_tformatted_blocks; /* valid whenldl_version>= f2 */
}__attribute__((packed))volume_label_t;
Quoted 3 lines
Best regards,
Christophe Varoqui
Hi Christophe,
yes,the change looks fine to me, thanks!
Mit freundlichen Grüßen / Kind regards
Stefan Weinhuber
Signature · 15 lines
Linux for zSeries kernel development IBM Systems &Technology Group, Systems Software Development / SW Linux für zSeries Entwicklung IBM Deutschland Schoenaicher Str. 220 71032 Boeblingen Phone: +49-7031-16-4018 E-Mail: [email protected] IBM Deutschland Research & Development GmbH / Vorsitzender des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294