Re: [PATCH virt-viewer] Make sure the compiler supports C99

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 13, 2014 at 03:21:29PM +0200, Tiziano Müller wrote:
> Otherwise passing explicit CFLAGS may omit the -std=c99, resulting in
> build failures. Requesting for a compiler supporting C99 makes sure
> -std=c99 is always passed along.

I haven't been able to hit issues when overriding CFLAGS manually
(either through make CFLAGS=... or CFLAGS=... ./autogen.sh).
However, passing --enable-compile-warnings=minimum removes -std=c99 from
the default CFLAGS, but this only exhibit minor issues:

diff --git a/src/virt-viewer-session.c b/src/virt-viewer-session.c
index 20d5fb1..b600481 100644
--- a/src/virt-viewer-session.c
+++ b/src/virt-viewer-session.c
@@ -395,13 +395,14 @@
virt_viewer_session_on_monitor_geometry_changed(VirtViewer
     gboolean all_fullscreen = TRUE;
     guint nmonitors = 0;
     GdkRectangle *monitors = NULL;
+    GList *l;
 
     klass = VIRT_VIEWER_SESSION_GET_CLASS(self);
     if (!klass->apply_monitor_geometry)
         return;
 
     /* find highest monitor ID so we can create the sparse array */
-    for (GList *l = self->priv->displays; l; l = l->next) {
+    for (l = self->priv->displays; l; l = l->next) {
         VirtViewerDisplay *d = VIRT_VIEWER_DISPLAY(l->data);
         guint nth = 0;
         g_object_get(d, "nth-display", &nth, NULL);
@@ -410,7 +411,7 @@
virt_viewer_session_on_monitor_geometry_changed(VirtViewerSe
     }
 
     monitors = g_new0(GdkRectangle, nmonitors);
-    for (GList *l = self->priv->displays; l; l = l->next) {
+    for (l = self->priv->displays; l; l = l->next) {
         VirtViewerDisplay *d = VIRT_VIEWER_DISPLAY(l->data);
         guint nth = 0;
         GdkRectangle *rect = NULL;

I'd tend to just fix this and not force --std=c99 since we don't really
need it at this point.

Christophe

Attachment: pgp0TCc_AiGgq.pgp
Description: PGP signature

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux