[vlc-commits] unimotion: fix const strings passed as non const

Steve Lhomme git at videolan.org
Wed Jul 17 10:22:43 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jul 16 13:34:45 2019 +0200| [125ddf8c36c160b97de2516db864d00f771d5f94] | committer: Felix Paul Kühne

unimotion: fix const strings passed as non const

Signed-off-by: Felix Paul Kühne <felix at feepk.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=125ddf8c36c160b97de2516db864d00f771d5f94
---

 modules/control/unimotion.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/control/unimotion.c b/modules/control/unimotion.c
index 4b07a3c15f..59044bb22e 100644
--- a/modules/control/unimotion.c
+++ b/modules/control/unimotion.c
@@ -107,7 +107,7 @@ union motion_data {
 };
 
 
-static int set_values(int type, int *kernFunc, char **servMatch, int *dataType)
+static int set_values(int type, int *kernFunc, const char **servMatch, int *dataType)
 {
     switch ( type ) {
         case powerbook:
@@ -137,7 +137,7 @@ static int set_values(int type, int *kernFunc, char **servMatch, int *dataType)
     return 1;
 }
 
-static int probe_sms(int kernFunc, char *servMatch, int dataType, void *data)
+static int probe_sms(int kernFunc, const char *servMatch, int dataType, void *data)
 {
     kern_return_t result;
     mach_port_t masterPort;
@@ -196,7 +196,7 @@ static int probe_sms(int kernFunc, char *servMatch, int dataType, void *data)
     memset(&inputStructure, 0, sizeof(union motion_data));
     memset(outputStructure, 0, sizeof(union motion_data));
 
-    result = IOConnectCallStructMethod(dataPort, kernFunc, &inputStructure, 
+    result = IOConnectCallStructMethod(dataPort, kernFunc, &inputStructure,
                 structureInputSize, outputStructure, &structureOutputSize );
 
     IOServiceClose(dataPort);
@@ -211,7 +211,7 @@ static int probe_sms(int kernFunc, char *servMatch, int dataType, void *data)
 int detect_sms()
 {
     int kernFunc;
-    char *servMatch;
+    const char *servMatch;
     int dataType;
     union motion_data data;
     int i;
@@ -229,7 +229,7 @@ int detect_sms()
 int read_sms_raw(int type, int *x, int *y, int *z)
 {
     int kernFunc;
-    char *servMatch;
+    const char *servMatch;
     int dataType;
     union motion_data data;
 



More information about the vlc-commits mailing list