qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Suggestions
@ 2009-05-14 19:57 Kent Harris
  2009-05-14 21:35 ` Anthony Liguori
  2009-05-15 13:02 ` andrzej zaborowski
  0 siblings, 2 replies; 4+ messages in thread
From: Kent Harris @ 2009-05-14 19:57 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1959 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-05 18:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14 19:57 [Qemu-devel] Suggestions Kent Harris
2009-05-14 21:35 ` Anthony Liguori
2009-06-05 18:32   ` Kent Harris
2009-05-15 13:02 ` andrzej zaborowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).