Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-03-30 12:22:59 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-03-30 12:22:59 +0400
commit51564c783f61f2c218badac70366381b8abb4c4f (patch)
tree4593fdd31c1d10570cbbc02c79eb19ba7526beac /winsup
parent4f03f6918204ccaadaccd7af3df2e787e7c94d21 (diff)
* regtool.cc (cmd_set): Avoid a compiler warning.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/utils/ChangeLog4
-rw-r--r--winsup/utils/regtool.cc12
2 files changed, 11 insertions, 5 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 9ad6ffdbc..5b028c1a0 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,5 +1,9 @@
2011-02-29 Corinna Vinschen <corinna@vinschen.de>
+ * regtool.cc (cmd_set): Avoid a compiler warning.
+
+2011-02-29 Corinna Vinschen <corinna@vinschen.de>
+
* cygcheck.cc (handle_unique_object_name): Avoid a compiler warning.
(dump_sysinfo): Ditto.
* loadlib.h (_load_sys_library): Mark as used, to avoid a compiler
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc
index 0da7ecad0..b4463f211 100644
--- a/winsup/utils/regtool.cc
+++ b/winsup/utils/regtool.cc
@@ -697,11 +697,13 @@ cmd_set ()
break;
case REG_SZ:
case REG_EXPAND_SZ:
- n = mbstowcs (NULL, a, 0);
- wchar_t w[n + 1];
- mbstowcs (w, a, n + 1);
- rv = RegSetValueExW (key, value, 0, value_type,
- (const BYTE *) w, (n + 1) * sizeof (wchar_t));
+ {
+ n = mbstowcs (NULL, a, 0);
+ wchar_t w[n + 1];
+ mbstowcs (w, a, n + 1);
+ rv = RegSetValueExW (key, value, 0, value_type,
+ (const BYTE *) w, (n + 1) * sizeof (wchar_t));
+ }
break;
case REG_MULTI_SZ:
for (i = 1, max_n = 1; argv[i]; i++)