Skip to contentSkip to conversation

qemu-edid: drop cast

PATCH In review Gerd Hoffmann 2 participants 5 messages Oct 13, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-edid: drop cast

Not needed and makes some compilers error out with:

qemu-edid.c:15:1: error: initializer element is not constant

---
 qemu-edid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-edid.c +1 -1
index 1db3372b982c..1cd6a9517238 100644
@@ -9,7 +9,7 @@
 #include "qemu/cutils.h"
 #include "hw/display/edid.h"
 
-static qemu_edid_info info = (qemu_edid_info) {
+static qemu_edid_info info = {
     .prefx = 1024,
     .prefy = 768,
 };
Signature · 1 line
2.27.0
#1 lore raw
Quoted 3 lines · Gerd Hoffmann

Not needed and makes some compilers error out with:

qemu-edid.c:15:1: error: initializer element is not constant

Which compilers do this. If we're not seeing this failure in our CI, then we have a CI gap that likely needs filling.

Quoted 23 lines
---
 qemu-edid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-edid.c +1 -1
index 1db3372b982c..1cd6a9517238 100644
@@ -9,7 +9,7 @@
 #include "qemu/cutils.h"
 #include "hw/display/edid.h"
 
-static qemu_edid_info info = (qemu_edid_info) {
+static qemu_edid_info info = {
     .prefx = 1024,
     .prefy = 768,
 };
Signature · 1 line
2.27.0

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#2 lore raw
Quoted 7 lines · Daniel P. Berrangé
Quoted 3 lines · Gerd Hoffmann

Not needed and makes some compilers error out with:

qemu-edid.c:15:1: error: initializer element is not constant

Which compilers do this. If we're not seeing this failure in our CI, then we have a CI gap that likely needs filling.

x86_64-w64-mingw32-gcc (GCC) 4.9.3 20150626 (Fedora MinGW 4.9.3-1.el7)

take care,
Gerd

#3 lore raw
Quoted 10 lines · Gerd Hoffmann
Quoted 7 lines · Daniel P. Berrangé
Quoted 3 lines · Gerd Hoffmann

Not needed and makes some compilers error out with:

qemu-edid.c:15:1: error: initializer element is not constant

Which compilers do this. If we're not seeing this failure in our CI, then we have a CI gap that likely needs filling.

x86_64-w64-mingw32-gcc (GCC) 4.9.3 20150626 (Fedora MinGW 4.9.3-1.el7)

Oh, that's a really ancient mingw toolchain. Officially we only care about current generation mingw toolchains ad don't try to support old ones. Effectively this means whatever mingw is in current shipping Fedora or MXE releases.

The fix is fine, but we don't need to worry about adding this CI after all since its an unsupported platform.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v1 1/1
#4 lore raw
In reply to Gerd Hoffmann
Quoted 14 lines · Gerd Hoffmann

Not needed and makes some compilers error out with:

qemu-edid.c:15:1: error: initializer element is not constant

---
 qemu-edid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-edid.c +0 -0
index 1db3372b982c..1cd6a9517238 100644

qemu-edid.c line 15

Quoted 8 lines
qemu-edid.c +1 -1
@@ -9,7 +9,7 @@
 #include "qemu/cutils.h"
 #include "hw/display/edid.h"
 
-static qemu_edid_info info = (qemu_edid_info) {
+static qemu_edid_info info = {
     .prefx = 1024,
     .prefy = 768,
 };

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|