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

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

 



On 09/01/2014 04:45 PM, Fabiano Fidêncio wrote:
---
  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/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;                          \


Hi,

Just wanted to mention that src is actually used within this function for most OPs.
It is hidden within _equation.
For some operations (such as "clear" and "noop") src is not used.

I guess the patch is OK (but a bit confusing), as gcc documentation [1],
explains that attribute unused means "to be possibly unused"
[1] https://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html

Uri.
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]