Browse Source

Eliminate compiler warnings

Neal Wilson 3 years ago
parent
commit
b458b68ca7
Signed by: Neal Wilson <neal@typica.us> GPG Key ID: 2A0BDDE701E66EB9
2 changed files with 14 additions and 1 deletions
  1. 1
    1
      src/modbus.w
  2. 13
    0
      src/typica.w

+ 1
- 1
src/modbus.w View File

@@ -562,7 +562,7 @@ void ModbusNG::dataAvailable()
562 562
         float floatresponse;
563 563
         char *ibytes = (char*)&intresponse;
564 564
         char *fbytes = (char*)&floatresponse;
565
-        double output;
565
+        double output = 0.0;
566 566
         switch(scanList.at(scanPosition).format)
567 567
         {
568 568
             case Int16:

+ 13
- 0
src/typica.w View File

@@ -3516,11 +3516,19 @@ QScriptValue constructQTime(QScriptContext *context,
3516 3516
         {@t\1@>@/
3517 3517
             case 4:@/
3518 3518
                 arg4 = argument<int>(3, context);
3519
+                arg3 = argument<int>(2, context);
3520
+                arg2 = argument<int>(1, context);
3521
+                arg1 = argument<int>(0, context);
3522
+                break;
3519 3523
             case 3:@/
3520 3524
                 arg3 = argument<int>(2, context);
3525
+                arg2 = argument<int>(1, context);
3526
+                arg1 = argument<int>(0, context);
3527
+                break;
3521 3528
             case 2:@/
3522 3529
                 arg2 = argument<int>(1, context);
3523 3530
                 arg1 = argument<int>(0, context);
3531
+                break;
3524 3532
             default:@/
3525 3533
                 break;@t\2@>@/
3526 3534
         }
@@ -3859,10 +3867,15 @@ QScriptValue QTime_setHMS(QScriptContext *context, QScriptEngine *engine)
3859 3867
         {@t\1@>@/
3860 3868
             case 4:@/
3861 3869
                 arg4 = argument<int>(3, context);
3870
+                arg3 = argument<int>(2, context);
3871
+                arg2 = argument<int>(1, context);
3872
+                arg1 = argument<int>(0, context);
3873
+                break;
3862 3874
             case 3:@/
3863 3875
                 arg3 = argument<int>(2, context);
3864 3876
                 arg2 = argument<int>(1, context);
3865 3877
                 arg1 = argument<int>(0, context);
3878
+                break;
3866 3879
             default:@/
3867 3880
                 break;@t\2@>@/
3868 3881
         }

Loading…
Cancel
Save