Sfoglia il codice sorgente

Suppress compiler warnings

Neal Wilson 11 anni fa
parent
commit
d380f1791d
3 ha cambiato i file con 9 aggiunte e 9 eliminazioni
  1. 3
    3
      src/dataqsdk.w
  2. 5
    5
      src/units.w
  3. 1
    1
      src/valueannotation.w

+ 3
- 3
src/dataqsdk.w Vedi File

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

+ 5
- 5
src/units.w Vedi File

@@ -386,7 +386,7 @@ engine->globalObject().setProperty("Units", value);
386 386
 @ The implementation of these functions is trivial.
387 387
 
388 388
 @<Functions for scripting@>=
389
-QScriptValue Units_convertTemperature(QScriptContext *context, QScriptEngine *engine)
389
+QScriptValue Units_convertTemperature(QScriptContext *context, QScriptEngine *)
390 390
 {
391 391
 	return QScriptValue(Units::convertTemperature(argument<double>(0, context),
392 392
 	                                              argument<Units::Unit>(1, context),
@@ -394,7 +394,7 @@ QScriptValue Units_convertTemperature(QScriptContext *context, QScriptEngine *en
394 394
 }
395 395
 
396 396
 QScriptValue Units_convertRelativeTemperature(QScriptContext *context,
397
-                                              QScriptEngine *engine)
397
+                                              QScriptEngine *)
398 398
 {
399 399
 	return QScriptValue(Units::convertRelativeTemperature(
400 400
 	                         argument<double>(0, context),
@@ -402,19 +402,19 @@ QScriptValue Units_convertRelativeTemperature(QScriptContext *context,
402 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 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 412
 	return QScriptValue(Units::convertWeight(argument<double>(0, context),
413 413
 	                                         argument<Units::Unit>(1, context),
414 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 419
 	return QScriptValue(Units::isWeightUnit(argument<Units::Unit>(0, context)));
420 420
 }

+ 1
- 1
src/valueannotation.w Vedi File

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

Loading…
Annulla
Salva