Browse Source

Eliminate compiler warnings

Neal Wilson 5 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
         float floatresponse;
562
         float floatresponse;
563
         char *ibytes = (char*)&intresponse;
563
         char *ibytes = (char*)&intresponse;
564
         char *fbytes = (char*)&floatresponse;
564
         char *fbytes = (char*)&floatresponse;
565
-        double output;
565
+        double output = 0.0;
566
         switch(scanList.at(scanPosition).format)
566
         switch(scanList.at(scanPosition).format)
567
         {
567
         {
568
             case Int16:
568
             case Int16:

+ 13
- 0
src/typica.w View File

3516
         {@t\1@>@/
3516
         {@t\1@>@/
3517
             case 4:@/
3517
             case 4:@/
3518
                 arg4 = argument<int>(3, context);
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
             case 3:@/
3523
             case 3:@/
3520
                 arg3 = argument<int>(2, context);
3524
                 arg3 = argument<int>(2, context);
3525
+                arg2 = argument<int>(1, context);
3526
+                arg1 = argument<int>(0, context);
3527
+                break;
3521
             case 2:@/
3528
             case 2:@/
3522
                 arg2 = argument<int>(1, context);
3529
                 arg2 = argument<int>(1, context);
3523
                 arg1 = argument<int>(0, context);
3530
                 arg1 = argument<int>(0, context);
3531
+                break;
3524
             default:@/
3532
             default:@/
3525
                 break;@t\2@>@/
3533
                 break;@t\2@>@/
3526
         }
3534
         }
3859
         {@t\1@>@/
3867
         {@t\1@>@/
3860
             case 4:@/
3868
             case 4:@/
3861
                 arg4 = argument<int>(3, context);
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
             case 3:@/
3874
             case 3:@/
3863
                 arg3 = argument<int>(2, context);
3875
                 arg3 = argument<int>(2, context);
3864
                 arg2 = argument<int>(1, context);
3876
                 arg2 = argument<int>(1, context);
3865
                 arg1 = argument<int>(0, context);
3877
                 arg1 = argument<int>(0, context);
3878
+                break;
3866
             default:@/
3879
             default:@/
3867
                 break;@t\2@>@/
3880
                 break;@t\2@>@/
3868
         }
3881
         }

Loading…
Cancel
Save