libxl: build fix
Hi!
Attached patch makes libxl build again on NetBSD.
The build error is:
warning: array subscript has type 'char'
Note, that we compile libxl with -Werror
Signed-off-by Christoph Egger <[email protected]>
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
tools/libxl/xl_cmdimpl.c +1 -1
@@ -1226,7 +1226,7 @@ static int64_t parse_mem_size_kb(char *mif (strlen (endptr) >1 )return -1 ; -switch (tolower (*endptr)) { +switch (tolower ((uint8_t )*endptr)) {case 't' : kbytes <<=10 ;case 'g' :
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Christoph Egger writes ("[Xen-devel] libxl: build fix"):
Quoted 5 lines
Attached patch makes libxl build again on NetBSD.
The build error is:
warning: array subscript has type 'char'
Note, that we compile libxl with -Werror
This patch is an improvement. But the correct approach is to cast to unsigned char, not uint8_t. (In the context of Xen this doesn't matter since our unsigned chars are all uint8_t anyway.)
Ian.