|
From: | Kent Harris |
Subject: | [Qemu-devel] Suggestions |
Date: | Thu, 14 May 2009 12:57:19 -0700 |
Hi folks, I'm not up to speed enough to feel comfortable submitting patches but I have noticed a couple issues and thought you might be interested. Some of us develop custom devices in C++ and need to include qemu header files into C++ source. cpu-all.h: some of the casts were removed when converting from "void *". C compilers are fine with this but C++ compilers are not: --- vm/qemu-current/cpu-all.h.orig 2009-05-14 11:08:55.829774000 -0700 +++ vm/qemu-current/cpu-all.h 2009-05-14 11:10:08.055136000 -0700 @@ -415,7 +415,7 @@ : "m" (*(uint16_t *)ptr)); return val; #else - const uint8_t *b = ptr; + const uint8_t *b = (const uint8_t *)ptr; return ((b[0] << 8) | b[1]); #endif } @@ -430,7 +430,7 @@ : "m" (*(uint16_t *)ptr)); return (int16_t)val; #else - const uint8_t *b = ptr; + const uint8_t *b = (const uint8_t *)ptr; return (int16_t)((b[0] << 8) | b[1]); #endif } net.h: looks like a structure member "void *private" was added. C++ compilers will not accept this since "public", "protected", and "private" are keywords to denote scope. This problem may exist in other header files. Thanks, Kent |
[Prev in Thread] | Current Thread | [Next in Thread] |