[polypaudio-commits] r642 - /trunk/src/polypcore/protocol-esound.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Apr 6 13:17:29 PDT 2006


Author: lennart
Date: Thu Apr  6 22:17:27 2006
New Revision: 642

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=642&root=polypaudio&view=rev
Log:
remove some GCC warnings introduced by improperly casting to (char*) instead of (const char*)

Modified:
    trunk/src/polypcore/protocol-esound.c

Modified: trunk/src/polypcore/protocol-esound.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/protocol-esound.c?rev=642&root=polypaudio&r1=641&r2=642&view=diff
==============================================================================
--- trunk/src/polypcore/protocol-esound.c (original)
+++ trunk/src/polypcore/protocol-esound.c Thu Apr  6 22:17:27 2006
@@ -297,7 +297,7 @@
         }
     }
 
-    data = (char*)data + ESD_KEY_LEN;
+    data = (const char*)data + ESD_KEY_LEN;
 
     memcpy(&ekey, data, sizeof(uint32_t));
     if (ekey == ESD_ENDIAN_KEY)
@@ -325,11 +325,11 @@
     
     memcpy(&format, data, sizeof(int32_t));
     format = MAYBE_INT32_SWAP(c->swap_byte_order, format);
-    data = (char*)data + sizeof(int32_t);
-
-    memcpy(&rate, (char*)data, sizeof(int32_t));
+    data = (const char*)data + sizeof(int32_t);
+
+    memcpy(&rate, data, sizeof(int32_t));
     rate = MAYBE_INT32_SWAP(c->swap_byte_order, rate);
-    data = (char*)data + sizeof(int32_t);
+    data = (const char*)data + sizeof(int32_t);
 
     ss.rate = rate;
     format_esd2native(format, c->swap_byte_order, &ss);
@@ -388,11 +388,11 @@
     
     memcpy(&format, data, sizeof(int32_t));
     format = MAYBE_INT32_SWAP(c->swap_byte_order, format);
-    data = (char*)data + sizeof(int32_t);
-
-    memcpy(&rate, (char*)data, sizeof(int32_t));
+    data = (const char*)data + sizeof(int32_t);
+
+    memcpy(&rate, data, sizeof(int32_t));
     rate = MAYBE_INT32_SWAP(c->swap_byte_order, rate);
-    data = (char*)data + sizeof(int32_t);
+    data = (const char*)data + sizeof(int32_t);
 
     ss.rate = rate;
     format_esd2native(format, c->swap_byte_order, &ss);
@@ -633,15 +633,15 @@
     
     memcpy(&idx, data, sizeof(uint32_t));
     idx = MAYBE_UINT32_SWAP(c->swap_byte_order, idx) - 1;
-    data = (char*)data + sizeof(uint32_t);
+    data = (const char*)data + sizeof(uint32_t);
 
     memcpy(&lvolume, data, sizeof(uint32_t));
     lvolume = MAYBE_UINT32_SWAP(c->swap_byte_order, lvolume);
-    data = (char*)data + sizeof(uint32_t);
+    data = (const char*)data + sizeof(uint32_t);
 
     memcpy(&rvolume, data, sizeof(uint32_t));
     rvolume = MAYBE_UINT32_SWAP(c->swap_byte_order, rvolume);
-    data = (char*)data + sizeof(uint32_t);
+    data = (const char*)data + sizeof(uint32_t);
 
     if ((conn = pa_idxset_get_by_index(c->protocol->connections, idx))) {
         assert(conn->sink_input);
@@ -667,11 +667,11 @@
 
     memcpy(&format, data, sizeof(int32_t));
     format = MAYBE_INT32_SWAP(c->swap_byte_order, format);
-    data = (char*)data + sizeof(int32_t);
-
-    memcpy(&rate, (char*)data + sizeof(int32_t), sizeof(int32_t));
+    data = (const char*)data + sizeof(int32_t);
+
+    memcpy(&rate, (const char*)data + sizeof(int32_t), sizeof(int32_t));
     rate = MAYBE_INT32_SWAP(c->swap_byte_order, rate);
-    data = (char*)data + sizeof(int32_t);
+    data = (const char*)data + sizeof(int32_t);
     
     ss.rate = rate;
     format_esd2native(format, c->swap_byte_order, &ss);




More information about the pulseaudio-commits mailing list