usr/fileio/common.c: Fix warning for older versions of GCC

Building SCST with an old version of GCC (e.g. 4.8.5 on Centos 7.X)
produces a warning about using initializer.

This is GCC bug # 53119:
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119

Hence, use memset() instead of an initializer to avoid this warning.

Fixes: e8b300ef2a ("usr/fileio/common.c: Fix use of uninitialized
struct field")
This commit is contained in:
Gleb Chesnokov
2023-03-12 21:42:52 +03:00
parent 06d46171ff
commit b6d1f19437
+3 -1
View File
@@ -792,7 +792,9 @@ void *main_loop(void *arg)
struct scst_user_reply_cmd replies[MULTI_CMDS_CNT];
struct scst_user_get_multi multi_cmd;
struct scst_user_get_cmd cmds[MULTI_CMDS_CNT];
} multi = {};
} multi;
memset(&multi, 0, sizeof(multi));
TRACE_ENTRY();