table: Avoid initializer warnings with GCC 4.9.
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 2 Jan 2019 21:29:49 +0000 (13:29 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 2 Jan 2019 21:29:49 +0000 (13:29 -0800)
src/output/cairo.c
src/output/table.h

index b0915dc583bc6e529b01f6302f36ec04fa371380..56919b8d77970a4b2550c4d8b9a084edf7a92728 100644 (file)
@@ -1483,7 +1483,7 @@ xr_layout_cell_text (struct xr_driver *xr, const struct table_cell *cell,
             dump_line (xr, -xr->left_margin, best,
                        xr->width + xr->right_margin, best,
                        RENDER_LINE_SINGLE,
-                       &CELL_COLOR (0, 255, 0));
+                       &(struct cell_color) CELL_COLOR (0, 255, 0));
         }
     }
 
index d162a28b4aeb399f7230d8fad121b4207c19499a..40cae3a22cabaf56e6dbcafc3d07dc83e75262d0 100644 (file)
@@ -65,7 +65,7 @@ struct cell_color
     uint8_t alpha, r, g, b;
   };
 
-#define CELL_COLOR(r, g, b) (struct cell_color) { 255, r, g, b }
+#define CELL_COLOR(r, g, b) { 255, r, g, b }
 #define CELL_COLOR_BLACK CELL_COLOR (0, 0, 0)
 #define CELL_COLOR_WHITE CELL_COLOR (255, 255, 255)