[vlc-devel] [PATCH] unimotion: fix const strings passed as non const
Steve Lhomme
robux4 at ycbcr.xyz
Tue Jul 16 13:34:45 CEST 2019
---
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;
--
2.17.1
More information about the vlc-devel
mailing list