Browse Source

Suppress compiler warnings

Neal Wilson 11 years ago
parent
commit
d380f1791d
3 changed files with 9 additions and 9 deletions
  1. 3
    3
      src/dataqsdk.w
  2. 5
    5
      src/units.w
  3. 1
    1
      src/valueannotation.w

+ 3
- 3
src/dataqsdk.w View File

496
 	int rstart = finalizedPort.indexOf("COM");
496
 	int rstart = finalizedPort.indexOf("COM");
497
 	finalizedPort.remove(0, rstart + 3);
497
 	finalizedPort.remove(0, rstart + 3);
498
 	bool chopFinished = false;
498
 	bool chopFinished = false;
499
-	int finalizedPortNumber;
499
+	int finalizedPortNumber = 0;
500
 	while(finalizedPort.size() > 0 && !chopFinished)
500
 	while(finalizedPort.size() > 0 && !chopFinished)
501
 	{
501
 	{
502
 		finalizedPortNumber = finalizedPort.toInt(&chopFinished);
502
 		finalizedPortNumber = finalizedPort.toInt(&chopFinished);
1098
 @<DATAQ SDK device settings@>=
1098
 @<DATAQ SDK device settings@>=
1099
 bool autoSelect;
1099
 bool autoSelect;
1100
 QString deviceID;
1100
 QString deviceID;
1101
-int channelOfInterest;
1101
+unsigned int channelOfInterest;
1102
 
1102
 
1103
 @ This information is accessed through the reference element associated with
1103
 @ This information is accessed through the reference element associated with
1104
 the parent node of the current configuration and from the row number of the
1104
 the parent node of the current configuration and from the row number of the
1141
 	resetButton->setEnabled(true);
1141
 	resetButton->setEnabled(true);
1142
 	calibrationDevice = new DataqSdkDevice(deviceID);
1142
 	calibrationDevice = new DataqSdkDevice(deviceID);
1143
 	Channel *channel;
1143
 	Channel *channel;
1144
-	for(int i = 0; i <= channelOfInterest; i++)
1144
+	for(unsigned int i = 0; i <= channelOfInterest; i++)
1145
 	{
1145
 	{
1146
 		channel = calibrationDevice->newChannel(Units::Unitless);
1146
 		channel = calibrationDevice->newChannel(Units::Unitless);
1147
 	}
1147
 	}

+ 5
- 5
src/units.w View File

386
 @ The implementation of these functions is trivial.
386
 @ The implementation of these functions is trivial.
387
 
387
 
388
 @<Functions for scripting@>=
388
 @<Functions for scripting@>=
389
-QScriptValue Units_convertTemperature(QScriptContext *context, QScriptEngine *engine)
389
+QScriptValue Units_convertTemperature(QScriptContext *context, QScriptEngine *)
390
 {
390
 {
391
 	return QScriptValue(Units::convertTemperature(argument<double>(0, context),
391
 	return QScriptValue(Units::convertTemperature(argument<double>(0, context),
392
 	                                              argument<Units::Unit>(1, context),
392
 	                                              argument<Units::Unit>(1, context),
394
 }
394
 }
395
 
395
 
396
 QScriptValue Units_convertRelativeTemperature(QScriptContext *context,
396
 QScriptValue Units_convertRelativeTemperature(QScriptContext *context,
397
-                                              QScriptEngine *engine)
397
+                                              QScriptEngine *)
398
 {
398
 {
399
 	return QScriptValue(Units::convertRelativeTemperature(
399
 	return QScriptValue(Units::convertRelativeTemperature(
400
 	                         argument<double>(0, context),
400
 	                         argument<double>(0, context),
402
 	                         argument<Units::Unit>(2, context)));
402
 	                         argument<Units::Unit>(2, context)));
403
 }
403
 }
404
 
404
 
405
-QScriptValue Units_isTemperatureUnit(QScriptContext *context, QScriptEngine *engine)
405
+QScriptValue Units_isTemperatureUnit(QScriptContext *context, QScriptEngine *)
406
 {
406
 {
407
 	return QScriptValue(Units::isTemperatureUnit(argument<Units::Unit>(0, context)));
407
 	return QScriptValue(Units::isTemperatureUnit(argument<Units::Unit>(0, context)));
408
 }
408
 }
409
 
409
 
410
-QScriptValue Units_convertWeight(QScriptContext *context, QScriptEngine *engine)
410
+QScriptValue Units_convertWeight(QScriptContext *context, QScriptEngine *)
411
 {
411
 {
412
 	return QScriptValue(Units::convertWeight(argument<double>(0, context),
412
 	return QScriptValue(Units::convertWeight(argument<double>(0, context),
413
 	                                         argument<Units::Unit>(1, context),
413
 	                                         argument<Units::Unit>(1, context),
414
 	                                         argument<Units::Unit>(2, context)));
414
 	                                         argument<Units::Unit>(2, context)));
415
 }
415
 }
416
 
416
 
417
-QScriptValue Units_isWeightUnit(QScriptContext *context, QScriptEngine *engine)
417
+QScriptValue Units_isWeightUnit(QScriptContext *context, QScriptEngine *)
418
 {
418
 {
419
 	return QScriptValue(Units::isWeightUnit(argument<Units::Unit>(0, context)));
419
 	return QScriptValue(Units::isWeightUnit(argument<Units::Unit>(0, context)));
420
 }
420
 }

+ 1
- 1
src/valueannotation.w View File

276
 @ The implementation of the functions also proceeds as usual.
276
 @ The implementation of the functions also proceeds as usual.
277
 
277
 
278
 @<Functions for scripting@>=
278
 @<Functions for scripting@>=
279
-QScriptValue constructValueAnnotation(QScriptContext *context, QScriptEngine *engine)
279
+QScriptValue constructValueAnnotation(QScriptContext *, QScriptEngine *engine)
280
 {
280
 {
281
 	QScriptValue object = engine->newQObject(new ValueAnnotation);
281
 	QScriptValue object = engine->newQObject(new ValueAnnotation);
282
 	setValueAnnotationProperties(object, engine);
282
 	setValueAnnotationProperties(object, engine);

Loading…
Cancel
Save