From bf8143c649292042de87c0cef63e6cb3c523388f Mon Sep 17 00:00:00 2001
From: nancy.liao <huihui.liao@greentest.com.cn>
Date: 周四, 08 5月 2025 16:40:10 +0800
Subject: [PATCH] 修改了一些警告信息

---
 libscpi/src/scpi-def.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libscpi/src/scpi-def.cpp b/libscpi/src/scpi-def.cpp
index 13cdd2a..38c665a 100644
--- a/libscpi/src/scpi-def.cpp
+++ b/libscpi/src/scpi-def.cpp
@@ -98,7 +98,7 @@
 }
 
 static scpi_result_t DMM_ConfigureVoltageDc(scpi_t * context) {
-    double param1, param2;
+    double param1 = -1.0, param2 = -1.0;
     fprintf(stderr, "conf:volt:dc\r\n"); /* debug command name */
 
     /* read first parameter if present */
@@ -234,7 +234,7 @@
             chanlst_idx = 0; /* call first index */
             arr_idx = 0; /* set arr_idx to 0 */
             do { /* if valid, iterate over channel_list_param index while res == valid (do-while cause we have to do it once) */
-                res = SCPI_ExprChannelListEntry(context, &channel_list_param, chanlst_idx, &is_range, values_from, values_to, 4, &dimensions);
+                res = (scpi_expr_result_t)SCPI_ExprChannelListEntry(context, &channel_list_param, chanlst_idx, &is_range, values_from, values_to, 4, &dimensions);
                 if (is_range == FALSE) { /* still can have multiple dimensions */
                     if (dimensions == 1) {
                         /* here we have our values
@@ -283,8 +283,8 @@
                                  * row == n
                                  * col == m
                                  * call a function or something */
-                                array[arr_idx].row = n;
-                                array[arr_idx].col = m;
+                                array[arr_idx].row =(int32_t) n;
+                                array[arr_idx].col = (int32_t)m;
                                 arr_idx++;
                                 if (arr_idx >= MAXROW * MAXCOL) {
                                     return SCPI_RES_ERR;

--
Gitblit v1.9.1