Bug 772351 - Fix deprecated writable strings warnings on smslib.mm. r=mounir
authorReuben Morais <reuben.morais@gmail.com>
Tue, 10 Jul 2012 18:31:04 -0400
changeset 98880 081902aa49be871123972497d84dfecab53d948b
parent 98879 f3145f3e7f4403bd8317df305d45fb4679e099d7
child 98881 fe989a36789ababba1c723f4b82ef93c4df20346
push id23088
push userryanvm@gmail.com
push dateWed, 11 Jul 2012 03:26:10 +0000
treeherdermozilla-central@8495e311226f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmounir
bugs772351
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 772351 - Fix deprecated writable strings warnings on smslib.mm. r=mounir
hal/cocoa/smslib.mm
--- a/hal/cocoa/smslib.mm
+++ b/hal/cocoa/smslib.mm
@@ -61,18 +61,18 @@ typedef struct axisStruct {
 	int size;					// Number of bytes
 	float zerog;				// Value meaning "zero g"
 	float oneg;					// Change in value meaning "increase of one g"
 								// (can be negative if axis sensor reversed)
 } axisStruct;
 
 // Represents the configuration of a type of sensor.
 typedef struct sensorSpec {
-	char *model;				// Prefix of model to be tested
-	char *name;					// Name of device to be read
+	const char *model;			// Prefix of model to be tested
+	const char *name;			// Name of device to be read
 	unsigned int function;		// Kernel function index
 	int recordSize;				// Size of record to be sent/received
 	axisStruct axes[3];			// Description of three axes (X, Y, Z)
 } sensorSpec;
 	
 // Configuration of all known types of sensors. The configurations are
 // tried in order until one succeeds in returning data.
 // All default values are set here, but each axis' zerog and oneg values 
@@ -268,17 +268,17 @@ static void prefSynchronize(void);
 float fakeData(NSTimeInterval time);
 
 #pragma mark Static variables
 
 static int debugging = NO;		// True if debugging (synthetic data)
 static io_connect_t connection;	// Connection for reading accel values
 static int running = NO;		// True if we successfully started
 static int sensorNum = 0;		// The current index into sensors[]
-static char *serviceName;		// The name of the current service
+static const char *serviceName;	// The name of the current service
 static char *iRecord, *oRecord;	// Pointers to read/write records for sensor
 static int recordSize;			// Size of read/write records
 static unsigned int function;	// Which kernel function should be used
 static float zeros[3];			// X, Y and Z zero calibration values
 static float onegs[3];			// X, Y and Z one-g calibration values
 
 #pragma mark Defines