[Cogl] [PATCH 2/2] Don't use the label 'ERROR' because it conflicts with windows.h

Robert Bragg robert at sixbynine.org
Wed Jun 20 12:20:40 PDT 2012


This looks good to land to me

Reviewed-by: Robert Bragg <robert at linux.intel.com>

regards,
- Robert

On Wed, Jun 20, 2012 at 4:54 PM, Neil Roberts <neil at linux.intel.com> wrote:
> wingdi.h which gets included from windows.h #defines ERROR to 0 so we
> can't use it as a label in Cogl. This patch changes it to be error in
> lower case instead.
> ---
>  cogl/cogl-blit.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/cogl/cogl-blit.c b/cogl/cogl-blit.c
> index 1dc0ef0..8039b66 100644
> --- a/cogl/cogl-blit.c
> +++ b/cogl/cogl-blit.c
> @@ -164,7 +164,7 @@ _cogl_blit_framebuffer_begin (CoglBlitData *data)
>
>   dst_fb = COGL_FRAMEBUFFER (dst_offscreen);
>   if (!cogl_framebuffer_allocate (dst_fb, NULL))
> -    goto ERROR;
> +    goto error;
>
>   src_offscreen= _cogl_offscreen_new_to_texture_full
>     (data->src_tex,
> @@ -172,17 +172,17 @@ _cogl_blit_framebuffer_begin (CoglBlitData *data)
>      0 /* level */);
>
>   if (src_offscreen == NULL)
> -    goto ERROR;
> +    goto error;
>
>   src_fb = COGL_FRAMEBUFFER (src_offscreen);
>   if (!cogl_framebuffer_allocate (src_fb, NULL))
> -    goto ERROR;
> +    goto error;
>
>   _cogl_push_framebuffers (dst_fb, src_fb);
>
>   return TRUE;
>
> -ERROR:
> +error:
>
>   if (dst_offscreen)
>     cogl_object_unref (dst_offscreen);
> --
> 1.7.3.16.g9464b
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list