[前][次][番号順一覧][スレッド一覧]

ruby-changes:60294

From: Nobuyoshi <ko1@a...>
Date: Wed, 4 Mar 2020 23:20:28 +0900 (JST)
Subject: [ruby-changes:60294] 5bb80b76b0 (master): [win32] suppress false warning by mingw gcc

https://git.ruby-lang.org/ruby.git/commit/?id=5bb80b76b0

From 5bb80b76b093130be14161bb0c8d05f6fea749f3 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 4 Mar 2020 23:13:18 +0900
Subject: [win32] suppress false warning by mingw gcc


diff --git a/vsnprintf.c b/vsnprintf.c
index 889c409..3efef20 100644
--- a/vsnprintf.c
+++ b/vsnprintf.c
@@ -561,7 +561,7 @@ BSD_vfprintf(FILE *fp, const char *fmt0, va_list ap) https://github.com/ruby/ruby/blob/trunk/vsnprintf.c#L561
 	int fprec = 0;		/* floating point precision */
 	char expstr[7];		/* buffer for exponent string */
 #endif
-	u_long MAYBE_UNUSED(ulval); /* integer arguments %[diouxX] */
+	u_long MAYBE_UNUSED(ulval) = 0; /* integer arguments %[diouxX] */
 #ifdef _HAVE_SANE_QUAD_
 	u_quad_t MAYBE_UNUSED(uqval); /* %q integers */
 #endif /* _HAVE_SANE_QUAD_ */
diff --git a/win32/win32.c b/win32/win32.c
index 0fa3855..b64540e 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -5271,7 +5271,7 @@ static int https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L5271
 wrename(const WCHAR *oldpath, const WCHAR *newpath)
 {
     int res = 0;
-    DWORD oldatts, newatts = (DWORD)-1;
+    DWORD oldatts = 0, newatts = (DWORD)-1;
     DWORD oldvsn = 0, newvsn = 0, e;
 
     e = get_attr_vsn(oldpath, &oldatts, &oldvsn);
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]