aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2018-08-18 09:24:38 +0300
committerEli Zaretskii2018-08-18 09:24:38 +0300
commit877cd22f553624b6d7f24141acd134f9cf839259 (patch)
treeb0e397131a3c29319bbf4bd93bc6fd607db08b60 /src
parent33002872364c69e2e6004fb981a8c975c3b38413 (diff)
downloademacs-877cd22f553624b6d7f24141acd134f9cf839259.tar.gz
emacs-877cd22f553624b6d7f24141acd134f9cf839259.zip
Avoid compilation warning in w32fns.c
* src/w32fns.c (Fw32_read_registry): Avoid compiler warning regarding possible use of 'rootkey' without initializing it first. Reported by Andy Moreton <andrewjmoreton@gmail.com>.
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index c32868fa695..b587677f090 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -10125,7 +10125,7 @@ to be converted to forward slashes by the caller. */)
10125 CHECK_STRING (key); 10125 CHECK_STRING (key);
10126 CHECK_STRING (name); 10126 CHECK_STRING (name);
10127 10127
10128 HKEY rootkey; 10128 HKEY rootkey = HKEY_CURRENT_USER;
10129 if (EQ (root, QHKCR)) 10129 if (EQ (root, QHKCR))
10130 rootkey = HKEY_CLASSES_ROOT; 10130 rootkey = HKEY_CLASSES_ROOT;
10131 else if (EQ (root, QHKCU)) 10131 else if (EQ (root, QHKCU))
@@ -10139,10 +10139,7 @@ to be converted to forward slashes by the caller. */)
10139 else if (!NILP (root)) 10139 else if (!NILP (root))
10140 error ("unknown root key: %s", SDATA (SYMBOL_NAME (root))); 10140 error ("unknown root key: %s", SDATA (SYMBOL_NAME (root)));
10141 10141
10142 Lisp_Object val = w32_read_registry (NILP (root) 10142 Lisp_Object val = w32_read_registry (rootkey, key, name);
10143 ? HKEY_CURRENT_USER
10144 : rootkey,
10145 key, name);
10146 if (NILP (val) && NILP (root)) 10143 if (NILP (val) && NILP (root))
10147 val = w32_read_registry (HKEY_LOCAL_MACHINE, key, name); 10144 val = w32_read_registry (HKEY_LOCAL_MACHINE, key, name);
10148 10145