]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix test_util.c compilation on MSVC
authorGisle Vanem <gvanem@broadpark.no>
Sat, 12 Nov 2011 04:49:02 +0000 (23:49 -0500)
committerNick Mathewson <nickm@torproject.org>
Sat, 12 Nov 2011 04:49:53 +0000 (23:49 -0500)
"Those '{}' constructs are not well liked by MSVC (cl v.16.xx)."

Received on tor-dev; fixes bug on 0.2.3.3-alpha.

changes/fix-msvc [new file with mode: 0644]
src/test/test_util.c

diff --git a/changes/fix-msvc b/changes/fix-msvc
new file mode 100644 (file)
index 0000000..62f0547
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Make util unit tests build correctly with MSVC. Bugfix on 
+      0.2.3.3-alpha. Patch by Gisle Vanem.
+
index 2146299f98bc1c06addfb0e86eec5de45074b26e..64bf52e7b167ce1a532fcc51d1a66e60ed79f9a2 100644 (file)
@@ -1597,7 +1597,7 @@ test_util_join_win_cmdline(void *ptr)
     {"a\\\\\\b", "de fg", "H", NULL}, // Backslashes
     {"a\\\"b", "\\c", "D\\", NULL}, // Backslashes before quote
     {"a\\\\b c", "d", "E", NULL}, // Backslashes not before quote
-    {} // Terminator
+    { NULL } // Terminator
   };
 
   const char *cmdlines[] = {
@@ -1649,7 +1649,7 @@ test_util_split_lines(void *ptr)
     {"\n\rfoo\n\rbar\r\n", 12, {"foo", "bar", NULL}},
     {"fo o\r\nb\tar", 10, {"fo o", "b.ar", NULL}},
     {"\x0f""f\0o\0\n\x01""b\0r\0\r", 12, {".f.o.", ".b.r.", NULL}},
-    {NULL, 0, {}}
+    {NULL, 0, { NULL }}
   };
 
   int i, j;