summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstore.h
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2018-02-21 19:23:44 -0800
committerIan Romanick <[email protected]>2018-03-02 16:10:44 -0800
commita9eb455e297d227bc4ca423e8470ed897d82b57b (patch)
tree3674593ae55864617429065c6c9ce6aa50cf5a6a /src/mesa/main/texstore.h
parent1049b57bf262a6afb2e2ab73062376258b33a442 (diff)
mesa: Silence unused parameter warnings from TEXSTORE_PARAMS
Reduces my build from 1717 warnings to 1547 warnings by silencing 170 instances of things like In file included from ../../SOURCE/master/src/mesa/main/texcompress_bptc.h:30:0, from ../../SOURCE/master/src/mesa/main/texcompress_bptc.c:31: ../../SOURCE/master/src/mesa/main/texcompress_bptc.c: In function ‘_mesa_texstore_bptc_rgba_unorm’: ../../SOURCE/master/src/mesa/main/texstore.h:60:14: warning: unused parameter ‘dstFormat’ [-Wunused-parameter] mesa_format dstFormat, \ ^ ../../SOURCE/master/src/mesa/main/texcompress_bptc.c:1276:32: note: in expansion of macro ‘TEXSTORE_PARAMS’ _mesa_texstore_bptc_rgba_unorm(TEXSTORE_PARAMS) ^~~~~~~~~~~~~~~ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/mesa/main/texstore.h')
-rw-r--r--src/mesa/main/texstore.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index f08dc08edde..b8281c51e2a 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -56,8 +56,8 @@
*/
#define TEXSTORE_PARAMS \
struct gl_context *ctx, GLuint dims, \
- GLenum baseInternalFormat, \
- mesa_format dstFormat, \
+ MAYBE_UNUSED GLenum baseInternalFormat, \
+ MAYBE_UNUSED mesa_format dstFormat, \
GLint dstRowStride, \
GLubyte **dstSlices, \
GLint srcWidth, GLint srcHeight, GLint srcDepth, \
@@ -65,6 +65,20 @@
const GLvoid *srcAddr, \
const struct gl_pixelstore_attrib *srcPacking
+/* This macro must be kept in sync with TEXSTORE_PARAMS. It is used in the
+ * few places where none of the parameters are used (i.e., the ETC texstore
+ * functions).
+ */
+#define UNUSED_TEXSTORE_PARAMS \
+ UNUSED struct gl_context *ctx, UNUSED GLuint dims, \
+ UNUSED GLenum baseInternalFormat, \
+ UNUSED mesa_format dstFormat, \
+ UNUSED GLint dstRowStride, \
+ UNUSED GLubyte **dstSlices, \
+ UNUSED GLint srcWidth, UNUSED GLint srcHeight, UNUSED GLint srcDepth, \
+ UNUSED GLenum srcFormat, UNUSED GLenum srcType, \
+ UNUSED const GLvoid *srcAddr, \
+ UNUSED const struct gl_pixelstore_attrib *srcPacking
extern GLboolean
_mesa_texstore(TEXSTORE_PARAMS);