From 567844d6b0c61d4f610bb1a71f5a9aa30b009be9 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Sun, 1 May 2022 20:32:52 +0200 Subject: [PATCH] Revert "mx_util: Avoid false maybe-uninitialized warnings" This reverts commit 83531e851cda6122864ef7e7876f947fb2dd483f. There will be another solution in the following commit. --- mx_util.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mx_util.c b/mx_util.c index d04d21dc..48718e56 100644 --- a/mx_util.c +++ b/mx_util.c @@ -356,7 +356,7 @@ int mx_strtoll(char *str, signed long long int *to) int mx_strtoui(char *str, unsigned int *to) { - unsigned long int ul = 0; /* avoid false maybe-uninitialized warning */ + unsigned long int ul; int res; assert(str); @@ -376,7 +376,7 @@ int mx_strtoui(char *str, unsigned int *to) int mx_strtou8(char *str, uint8_t *to) { - unsigned long int ul = 0; /* avoid false maybe-uninitialized warning */ + unsigned long int ul; int res; assert(str); @@ -396,7 +396,7 @@ int mx_strtou8(char *str, uint8_t *to) int mx_strtou16(char *str, uint16_t *to) { - unsigned long int ul = 0; /* avoid false maybe-uninitialized warning */ + unsigned long int ul; int res; assert(str); @@ -416,7 +416,7 @@ int mx_strtou16(char *str, uint16_t *to) int mx_strtou32(char *str, uint32_t *to) { - unsigned long int ul = 0; /* avoid false maybe-uninitialized warning */ + unsigned long int ul; int res; assert(str); @@ -436,7 +436,7 @@ int mx_strtou32(char *str, uint32_t *to) int mx_strtou64(char *str, uint64_t *to) { - unsigned long long int ull = 0; /* avoid false maybe-uninitialized warning */; + unsigned long long int ull; int res; assert(str); @@ -458,7 +458,7 @@ int mx_strtou64(char *str, uint64_t *to) int mx_strtoi(char *str, signed int *to) { - signed long int l = 0; /* avoid false maybe-uninitialized warning */ + signed long int l; int res; assert(str); @@ -478,7 +478,7 @@ int mx_strtoi(char *str, signed int *to) int mx_strtoi8(char *str, int8_t *to) { - signed long int l = 0; /* avoid false maybe-uninitialized warning */ + signed long int l; int res; assert(str); @@ -498,7 +498,7 @@ int mx_strtoi8(char *str, int8_t *to) int mx_strtoi16(char *str, int16_t *to) { - signed long int l = 0; /* avoid false maybe-uninitialized warning */ + signed long int l; int res; assert(str); @@ -518,7 +518,7 @@ int mx_strtoi16(char *str, int16_t *to) int mx_strtoi32(char *str, int32_t *to) { - signed long int l = 0; /* avoid false maybe-uninitialized warning */ + signed long int l; int res; assert(str); @@ -538,7 +538,7 @@ int mx_strtoi32(char *str, int32_t *to) int mx_strtoi64(char *str, int64_t *to) { - signed long long int ll = 0; /* avoid false maybe-uninitialized warning */ + signed long long int ll; int res; assert(str); @@ -796,7 +796,7 @@ int mx_read_first_line_from_file(char *fname, char **line) int mx_strscan_ull(char **str, unsigned long long int *to) { - unsigned long long int l = 0; /* avoid false maybe-uninitialized warning */; + unsigned long long int l; char *s; char *p; char o = 0; @@ -827,7 +827,7 @@ int mx_strscan_ull(char **str, unsigned long long int *to) int mx_strscan_ll(char **str, long long int *to) { - long long int l = 0; /* avoid false maybe-uninitialized warning */; + long long int l; char *s; char *p; char o = 0;