[Spice-devel] [[spice-common] 2/4] common: Fix -Wunused-parameter

Fabiano Fidêncio fidencio at redhat.com
Mon Sep 1 06:45:21 PDT 2014


---
 common/canvas_utils.c  |  3 ++-
 common/lines.c         | 19 ++++++++++++++-----
 common/marshaller.c    |  2 +-
 common/pixman_utils.c  |  2 +-
 common/quic.c          |  2 +-
 common/quic_rgb_tmpl.c |  8 ++++----
 common/quic_tmpl.c     |  8 ++++----
 common/rop3.c          | 14 +++++++++-----
 8 files changed, 36 insertions(+), 22 deletions(-)

diff --git a/common/canvas_utils.c b/common/canvas_utils.c
index 297b8ce..d52292b 100644
--- a/common/canvas_utils.c
+++ b/common/canvas_utils.c
@@ -32,7 +32,8 @@
 static int gdi_handlers = 0;
 #endif
 
-static void release_data(pixman_image_t *image, void *release_data)
+static void release_data(SPICE_GNUC_UNUSED pixman_image_t *image,
+                         void *release_data)
 {
     PixmanData *data = (PixmanData *)release_data;
 
diff --git a/common/lines.c b/common/lines.c
index e345b95..726a350 100644
--- a/common/lines.c
+++ b/common/lines.c
@@ -1824,7 +1824,7 @@ miFillRectPolyHelper (GCPtr pGC, Boolean foreground, SpanDataPtr spanData, int x
 }
 
 static int
-miPolyBuildEdge (double x0, double y0, double k,        /* x0 * dy - y0 * dx */
+miPolyBuildEdge (SPICE_GNUC_UNUSED double x0, double y0, double k, /* x0 * dy - y0 * dx */
                  int dx, int dy, int xi, int yi, int left, PolyEdgePtr edge)
 {
     int x, y, e;
@@ -1959,7 +1959,11 @@ miPolyBuildPoly (PolyVertexPtr vertices,
 }
 
 static void
-miLineOnePoint (GCPtr pGC, Boolean foreground, SpanDataPtr spanData, int x, int y)
+miLineOnePoint (GCPtr pGC,
+                Boolean foreground,
+                SPICE_GNUC_UNUSED SpanDataPtr spanData,
+                int x,
+                int y)
 {
     DDXPointRec pt;
     int wid;
@@ -2490,9 +2494,14 @@ miLineArc (GCPtr pGC,
 }
 
 static void
-miLineProjectingCap (GCPtr pGC, Boolean foreground,
-                     SpanDataPtr spanData, LineFacePtr face, Boolean isLeft,
-                     double xorg, double yorg, Boolean isInt)
+miLineProjectingCap (GCPtr pGC,
+                     Boolean foreground,
+                     SpanDataPtr spanData,
+                     LineFacePtr face,
+                     Boolean isLeft,
+                     SPICE_GNUC_UNUSED double xorg,
+                     SPICE_GNUC_UNUSED double yorg,
+                     Boolean isInt)
 {
     int xorgi = 0, yorgi = 0;
     int lw;
diff --git a/common/marshaller.c b/common/marshaller.c
index 3d889a4..bd012d7 100644
--- a/common/marshaller.c
+++ b/common/marshaller.c
@@ -564,7 +564,7 @@ void *spice_marshaller_add_uint32(SpiceMarshaller *m, uint32_t v)
     return (void *)ptr;
 }
 
-void spice_marshaller_set_uint32(SpiceMarshaller *m, void *ref, uint32_t v)
+void spice_marshaller_set_uint32(SPICE_GNUC_UNUSED SpiceMarshaller *m, void *ref, uint32_t v)
 {
     write_uint32((uint8_t *)ref, v);
 }
diff --git a/common/pixman_utils.c b/common/pixman_utils.c
index db7a67f..5bf5717 100644
--- a/common/pixman_utils.c
+++ b/common/pixman_utils.c
@@ -30,7 +30,7 @@
 
 #define SOLID_RASTER_OP(_name, _size, _type, _equation)  \
 static void                                        \
-solid_rop_ ## _name ## _ ## _size (_type *ptr, int len, _type src)  \
+solid_rop_ ## _name ## _ ## _size (_type *ptr, int len, SPICE_GNUC_UNUSED _type src)  \
 {                                                  \
     while (len--) {                                \
         _type dst = *ptr;                          \
diff --git a/common/quic.c b/common/quic.c
index 90ea47b..16290d4 100644
--- a/common/quic.c
+++ b/common/quic.c
@@ -840,7 +840,7 @@ typedef uint16_t rgb16_pixel_t;
 
 #endif
 
-static void fill_model_structures(Encoder *encoder, FamilyStat *family_stat,
+static void fill_model_structures(SPICE_GNUC_UNUSED Encoder *encoder, FamilyStat *family_stat,
                                   unsigned int rep_first, unsigned int first_size,
                                   unsigned int rep_next, unsigned int mul_size,
                                   unsigned int levels, unsigned int ncounters,
diff --git a/common/quic_rgb_tmpl.c b/common/quic_rgb_tmpl.c
index 19cc348..f807a0c 100644
--- a/common/quic_rgb_tmpl.c
+++ b/common/quic_rgb_tmpl.c
@@ -223,7 +223,7 @@ static void FNAME(compress_row0_seg)(Encoder *encoder, int i,
                                      const PIXEL * const cur_row,
                                      const int end,
                                      const unsigned int waitmask,
-                                     const unsigned int bpc,
+                                     SPICE_GNUC_UNUSED const unsigned int bpc,
                                      const unsigned int bpc_mask)
 {
     Channel * const channel_r = encoder->channels;
@@ -331,7 +331,7 @@ static void FNAME(compress_row_seg)(Encoder *encoder, int i,
                                     const PIXEL * const cur_row,
                                     const int end,
                                     const unsigned int waitmask,
-                                    const unsigned int bpc,
+                                    SPICE_GNUC_UNUSED const unsigned int bpc,
                                     const unsigned int bpc_mask)
 {
     Channel * const channel_r = encoder->channels;
@@ -478,7 +478,7 @@ static void FNAME(uncompress_row0_seg)(Encoder *encoder, int i,
                                        PIXEL * const cur_row,
                                        const int end,
                                        const unsigned int waitmask,
-                                       const unsigned int bpc,
+                                       SPICE_GNUC_UNUSED const unsigned int bpc,
                                        const unsigned int bpc_mask)
 {
     Channel * const channel_r = encoder->channels;
@@ -594,7 +594,7 @@ static void FNAME(uncompress_row_seg)(Encoder *encoder,
                                       PIXEL * const cur_row,
                                       int i,
                                       const int end,
-                                      const unsigned int bpc,
+                                      SPICE_GNUC_UNUSED const unsigned int bpc,
                                       const unsigned int bpc_mask)
 {
     Channel * const channel_r = encoder->channels;
diff --git a/common/quic_tmpl.c b/common/quic_tmpl.c
index b1ddbc4..e839346 100644
--- a/common/quic_tmpl.c
+++ b/common/quic_tmpl.c
@@ -152,7 +152,7 @@ static void FNAME(compress_row0_seg)(Encoder *encoder, Channel *channel, int i,
                                      const PIXEL * const cur_row,
                                      const int end,
                                      const unsigned int waitmask,
-                                     const unsigned int bpc,
+                                     SPICE_GNUC_UNUSED const unsigned int bpc,
                                      const unsigned int bpc_mask)
 {
     BYTE * const decorelate_drow = channel->correlate_row;
@@ -243,7 +243,7 @@ static void FNAME(compress_row_seg)(Encoder *encoder, Channel *channel, int i,
                                     const PIXEL * const cur_row,
                                     const int end,
                                     const unsigned int waitmask,
-                                    const unsigned int bpc,
+                                    SPICE_GNUC_UNUSED const unsigned int bpc,
                                     const unsigned int bpc_mask)
 {
     BYTE * const decorelate_drow = channel->correlate_row;
@@ -385,7 +385,7 @@ static void FNAME(uncompress_row0_seg)(Encoder *encoder, Channel *channel, int i
                                        PIXEL * const cur_row,
                                        const int end,
                                        const unsigned int waitmask,
-                                       const unsigned int bpc,
+                                       SPICE_GNUC_UNUSED const unsigned int bpc,
                                        const unsigned int bpc_mask)
 {
     int stopidx;
@@ -486,7 +486,7 @@ static void FNAME(uncompress_row_seg)(Encoder *encoder, Channel *channel,
                                       PIXEL * const cur_row,
                                       int i,
                                       const int end,
-                                      const unsigned int bpc,
+                                      SPICE_GNUC_UNUSED const unsigned int bpc,
                                       const unsigned int bpc_mask)
 {
     const unsigned int waitmask = bppmask[channel->state.wmidx];
diff --git a/common/rop3.c b/common/rop3.c
index d5b46db..97bfe0c 100644
--- a/common/rop3.c
+++ b/common/rop3.c
@@ -43,15 +43,19 @@ static rop3_test_handler_t rop3_test_handlers_32[ROP3_NUM_OPS];
 static rop3_test_handler_t rop3_test_handlers_16[ROP3_NUM_OPS];
 
 
-static void default_rop3_with_pattern_handler(pixman_image_t *d, pixman_image_t *s,
-                                              SpicePoint *src_pos, pixman_image_t *p,
-                                              SpicePoint *pat_pos)
+static void default_rop3_with_pattern_handler(SPICE_GNUC_UNUSED pixman_image_t *d,
+                                              SPICE_GNUC_UNUSED pixman_image_t *s,
+                                              SPICE_GNUC_UNUSED SpicePoint *src_pos,
+                                              SPICE_GNUC_UNUSED pixman_image_t *p,
+                                              SPICE_GNUC_UNUSED SpicePoint *pat_pos)
 {
     spice_critical("not implemented");
 }
 
-static void default_rop3_withe_color_handler(pixman_image_t *d, pixman_image_t *s, SpicePoint *src_pos,
-                                             uint32_t rgb)
+static void default_rop3_withe_color_handler(SPICE_GNUC_UNUSED pixman_image_t *d,
+                                             SPICE_GNUC_UNUSED pixman_image_t *s,
+                                             SPICE_GNUC_UNUSED SpicePoint *src_pos,
+                                             SPICE_GNUC_UNUSED uint32_t rgb)
 {
     spice_critical("not implemented");
 }
-- 
1.9.3



More information about the Spice-devel mailing list