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

ruby-changes:72288

From: Nobuyoshi <ko1@a...>
Date: Thu, 23 Jun 2022 16:45:44 +0900 (JST)
Subject: [ruby-changes:72288] 2361a1a53e (master): Get rid of a nasal demon

https://git.ruby-lang.org/ruby.git/commit/?id=2361a1a53e

From 2361a1a53e93ededcf99289650124cf7a2b064d4 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 23 Jun 2022 16:02:33 +0900
Subject: Get rid of a nasal demon

On platforms not having `typeof`, `ccan_container_off_var()` macro
subtracts the pointer variable from the member address pointed by that
variable.
---
 variable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/variable.c b/variable.c
index bde8937486..def997d201 100644
--- a/variable.c
+++ b/variable.c
@@ -2620,7 +2620,7 @@ autoload_apply_constants(VALUE _arguments) https://github.com/ruby/ruby/blob/trunk/variable.c#L2620
 
     struct autoload_load_arguments *arguments = (struct autoload_load_arguments*)_arguments;
 
-    struct autoload_const *autoload_const;
+    struct autoload_const *autoload_const = 0; // for ccan_container_off_var()
     struct autoload_const *next;
 
     // We use safe iteration here because `autoload_const_set` will eventually invoke
-- 
cgit v1.2.1


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

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