changeset 26911:0a4d4fb456cd

add const, suppress warnings
author bcoudurier
date Sun, 01 Jun 2008 03:23:50 +0000
parents da8e02081774
children 794c8b614799
files libswscale/rgb2rgb.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/rgb2rgb.c	Sun Jun 01 03:21:12 2008 +0000
+++ b/libswscale/rgb2rgb.c	Sun Jun 01 03:23:50 2008 +0000
@@ -305,13 +305,13 @@
 {
     long i;
     for (i=0; i<num_pixels; i++)
-        ((uint16_t *)dst)[i] = ((uint16_t *)palette)[src[i]];
+        ((uint16_t *)dst)[i] = ((const uint16_t *)palette)[src[i]];
 }
 void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
 {
     long i;
     for (i=0; i<num_pixels; i++)
-        ((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[src[i]]);
+        ((uint16_t *)dst)[i] = bswap_16(((const uint16_t *)palette)[src[i]]);
 }
 
 /**
@@ -321,13 +321,13 @@
 {
     long i;
     for (i=0; i<num_pixels; i++)
-        ((uint16_t *)dst)[i] = ((uint16_t *)palette)[src[i]];
+        ((uint16_t *)dst)[i] = ((const uint16_t *)palette)[src[i]];
 }
 void palette8tobgr15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
 {
     long i;
     for (i=0; i<num_pixels; i++)
-        ((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[src[i]]);
+        ((uint16_t *)dst)[i] = bswap_16(((const uint16_t *)palette)[src[i]]);
 }
 
 void rgb32tobgr24(const uint8_t *src, uint8_t *dst, long src_size)
@@ -373,7 +373,7 @@
 {
     const uint16_t *end;
     uint8_t *d = (uint8_t *)dst;
-    const uint16_t *s = (uint16_t *)src;
+    const uint16_t *s = (const uint16_t *)src;
     end = s + src_size/2;
     while (s < end)
     {
@@ -471,7 +471,7 @@
 {
     const uint16_t *end;
     uint8_t *d = (uint8_t *)dst;
-    const uint16_t *s = (uint16_t *)src;
+    const uint16_t *s = (const uint16_t *)src;
     end = s + src_size/2;
     while (s < end)
     {