[Cluster-devel] [PATCH dlm-tool 3/6] stonith_helper: Fix gcc build warnings

Alexander Aring aahringo at redhat.com
Thu Dec 2 20:20:36 UTC 2021


Took it from the debian patches. The return value of getopt() is int not
char. This patch switches the return value which is stored in variable
c to int.

Reported-by: Valentin Vidic <vvidic at debian.org>
---
 fence/stonith_helper.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fence/stonith_helper.c b/fence/stonith_helper.c
index b1db352a..92fe0e5d 100644
--- a/fence/stonith_helper.c
+++ b/fence/stonith_helper.c
@@ -25,8 +25,7 @@ static int get_options(int argc, char *argv[])
 	char arg[MAX_ARG_LEN];
 	char key[MAX_ARG_LEN];
 	char val[MAX_ARG_LEN];
-	char c;
-	int rv;
+	int rv, c;
 
 	if (argc > 1) {
 		while ((c = getopt(argc, argv, "n:t:")) != -1) {
-- 
2.27.0




More information about the Cluster-devel mailing list