On 12/16/2015 05:37 PM, baker.dyla...@gmail.com wrote: > From: Dylan Baker <baker.dyla...@gmail.com> > > This is groundwork for adding a json interface to wflinfo. > --- > src/utils/wflinfo.c | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > > diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c > index 268d4b8..905fd90 100644 > --- a/src/utils/wflinfo.c > +++ b/src/utils/wflinfo.c > @@ -487,17 +487,18 @@ print_extensions(bool use_stringi) > printf("\n"); > } > > +static struct { > + GLint flag; > + char *str; > +} flags[] = { > + { GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT, "FORWARD_COMPATIBLE" }, > + { GL_CONTEXT_FLAG_DEBUG_BIT, "DEBUG" }, > + { GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB, "ROBUST_ACCESS" }, > +};
Since the array is now global and no longer local to the print_context_flags() function, please rename it to 'context_flags'. > + > static void > print_context_flags(void) > { > - static struct { > - GLint flag; > - char *str; > - } flags[] = { > - { GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT, "FORWARD_COMPATIBLE" }, > - { GL_CONTEXT_FLAG_DEBUG_BIT, "DEBUG" }, > - { GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB, "ROBUST_ACCESS" }, > - }; > int flag_count = sizeof(flags) / sizeof(flags[0]); > GLint context_flags = 0; > > @@ -526,6 +527,8 @@ print_context_flags(void) > } > } > printf("\n"); > + > + return; > } Like Frank said, the return is not needed. Please drop it. _______________________________________________ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle