[sane-devel] Re: [sane-commit] CVS update: sane-backends/include/sane

Henning Meier-Geinitz henning@meier-geinitz.de
Sat, 13 Nov 2004 20:53:27 +0100


Hi,

On Sat, Nov 13, 2004 at 12:04:44PM -0700, nobody@sane.alioth.debian.org wrote:
> Date:	Saturday November 13, 2004 @ 12:04
> Author:	fzago-guest
> 
> Update of /cvsroot/sane/sane-backends/include/sane
> In directory haydn:/tmp/cvs-serv11150
> 
> Modified Files:
> 	sane.h 
> Log Message:
> Added compiler attribute __unused__ for unused variables/functions.

+/*
+ * Compiler related options
+ */
+
+#ifdef __GNUC__
+
+/* __unused tells the compiler a variable is unused, so the
+ * compiler doesn't spit a warning. */
+#define __unused__ __attribute__((unused))
+
+#else
+
+#define __unused__
+
+#endif

Wouldn't that better fit to sanei_backend.h? I think we shouldn't
export such "helper" macros to all the frontends.

Bye,
  Henning