It's just a simple, portable way to make the `unused parameter` warning shut up, when you're deliberately ignoring your parameters.
There are other ways [__attribute__(( unused )), etc] but they cease to be simple or portable fairly quickly. -- Chris On Mon, Aug 26, 2013 at 5:07 PM, Liu Xin <liu...@icubecorp.com> wrote: > HI, list, > > i don't understand why glsl source have so many 'cast to void' operations, > like this. > > ir_rvalue * > ast_node::hir(exec_list *instructions, > struct _mesa_glsl_parse_state *state) > { > (void) instructions; > (void) state; > > return NULL; > } > > i think it's totally void operation, do you guy just make gcc compiler > happy? > > thanks, > --lx > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev