Re: [PATCH spice-common 2/2] canvas_base: Change spice_warning to g_warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>

On Tue, 2018-07-10 at 14:35 +0100, Frediano Ziglio wrote:
> The 2 APIs are equivalent.
> Some minor coherence changes:
> - remove line terminator, already added;
> - start message with lower case;
> - LZ4, not Lz4.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  common/canvas_base.c | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/common/canvas_base.c b/common/canvas_base.c
> index ae07625..95f82b3 100644
> --- a/common/canvas_base.c
> +++ b/common/canvas_base.c
> @@ -377,7 +377,7 @@ static pixman_image_t *canvas_get_quic(CanvasBase
> *canvas, SpiceImage *image,
>          if (surface != NULL) {
>              pixman_image_unref(surface);
>          }
> -        spice_warning("%s", quic_data->message_buf);
> +        g_warning("%s", quic_data->message_buf);
>          return NULL;
>      }
>  
> @@ -388,7 +388,7 @@ static pixman_image_t *canvas_get_quic(CanvasBase
> *canvas, SpiceImage *image,
>                            SPICE_UNALIGNED_CAST(uint32_t *,image-
> >u.quic.data->chunk[0].data),
>                            image->u.quic.data->chunk[0].len >> 2,
>                            &type, &width, &height) == QUIC_ERROR) {
> -        spice_warning("quic decode begin failed");
> +        g_warning("quic decode begin failed");
>          return NULL;
>      }
>  
> @@ -433,7 +433,7 @@ static pixman_image_t *canvas_get_quic(CanvasBase
> *canvas, SpiceImage *image,
>      if (quic_decode(quic_data->quic, as_type,
>                      dest, stride) == QUIC_ERROR) {
>          pixman_image_unref(surface);
> -        spice_warning("quic decode failed");
> +        g_warning("quic decode failed");
>          return NULL;
>      }
>  
> @@ -488,7 +488,7 @@ static pixman_image_t *canvas_get_jpeg(CanvasBase
> *canvas, SpiceImage *image)
>      surface = surface_create(PIXMAN_LE_x8r8g8b8,
>                               width, height, FALSE);
>      if (surface == NULL) {
> -        spice_warning("create surface failed");
> +        g_warning("create surface failed");
>          return NULL;
>      }
>  
> @@ -560,14 +560,14 @@ static pixman_image_t
> *canvas_get_lz4(CanvasBase *canvas, SpiceImage *image)
>              stride_encoded *= 4;
>              break;
>          default:
> -            spice_warning("Unsupported bitmap format %d with LZ4\n",
> spice_format);
> +            g_warning("unsupported bitmap format %d with LZ4",
> spice_format);
>              return NULL;
>      }
>  
>      surface = surface_create(format,
>                               width, height, top_down);
>      if (surface == NULL) {
> -        spice_warning("create surface failed");
> +        g_warning("create surface failed");
>          return NULL;
>      }
>  
> @@ -610,7 +610,7 @@ static pixman_image_t *canvas_get_lz4(CanvasBase
> *canvas, SpiceImage *image)
>      return surface;
>  
>  format_error:
> -    spice_warning("Error decoding LZ4 block\n");
> +    g_warning("error decoding LZ4 block");
>      LZ4_freeStreamDecode(stream);
>      pixman_image_unref(surface);
>      return NULL;
> @@ -648,7 +648,7 @@ static pixman_image_t
> *canvas_get_jpeg_alpha(CanvasBase *canvas, SpiceImage *ima
>                                       width, height, width*height,
> alpha_top_down);
>  
>      if (surface == NULL) {
> -        spice_warning("create surface failed");
> +        g_warning("create surface failed");
>          return NULL;
>      }
>  
> @@ -701,7 +701,7 @@ static pixman_image_t
> *canvas_bitmap_to_surface(CanvasBase *canvas, SpiceBitmap*
>      image = surface_create(format,
>                             bitmap->x, bitmap->y, FALSE);
>      if (image == NULL) {
> -        spice_warning("create surface failed");
> +        g_warning("create surface failed");
>          return NULL;
>      }
>  
> @@ -790,7 +790,7 @@ static pixman_image_t *canvas_get_lz(CanvasBase
> *canvas, SpiceImage *image,
>              free(palette);
>          }
>          free(decomp_buf);
> -        spice_warning("%s", lz_data->message_buf);
> +        g_warning("%s", lz_data->message_buf);
>          return NULL;
>      }
>  
> @@ -1126,7 +1126,7 @@ static pixman_image_t
> *get_surface_from_canvas(CanvasBase *canvas,
>  #ifdef USE_LZ4
>          return canvas_get_lz4(canvas, image);
>  #else
> -        spice_warning("Lz4 compression algorithm not supported.\n");
> +        g_warning("LZ4 compression algorithm not supported");
>          return NULL;
>  #endif
>  
> @@ -1224,7 +1224,7 @@ static pixman_image_t
> *canvas_get_image_internal(CanvasBase *canvas, SpiceImage
>  #ifdef SW_CANVAS_CACHE
>      } else if (descriptor->flags &
> SPICE_IMAGE_FLAGS_CACHE_REPLACE_ME) {
>          if (spice_image_descriptor_is_lossy(descriptor)) {
> -            spice_warning("invalid cache replace request: the image
> is lossy");
> +            g_warning("invalid cache replace request: the image is
> lossy");
>              return NULL;
>          }
>          canvas->bits_cache->ops->replace_lossy(canvas->bits_cache,
> descriptor->id, surface);
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]