Re: [PATCH v3] MSVC: fix t0040-parse-options crash

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v3] MSVC: fix t0040-parse-options crash

From: Andreas Schwab <hidden>
Date: 2016-06-15 23:00:35

Marat Radchenko [off-list ref] writes:
quoted hunk
diff --git a/test-parse-options.c b/test-parse-options.c
index 434e8b8..6f6c656 100644
--- a/test-parse-options.c
+++ b/test-parse-options.c
@@ -60,7 +60,7 @@ int main(int argc, char **argv)
 		OPT_STRING('o', NULL, &string, "str", "get another string"),
 		OPT_NOOP_NOARG(0, "obsolete"),
 		OPT_SET_PTR(0, "default-string", &string,
-			"set string to default", (unsigned long)"default"),
+			"set string to default", (intptr_t)"default"),
Why doesn't OPT_SET_PTR take a pointer?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Re: [PATCH v3] MSVC: fix t0040-parse-options crash

From: René Scharfe <hidden>
Date: 2016-06-15 23:00:35

Am 29.03.2014 22:34, schrieb Andreas Schwab:
Marat Radchenko [off-list ref] writes:
quoted
diff --git a/test-parse-options.c b/test-parse-options.c
index 434e8b8..6f6c656 100644
--- a/test-parse-options.c
+++ b/test-parse-options.c
@@ -60,7 +60,7 @@ int main(int argc, char **argv)
  		OPT_STRING('o', NULL, &string, "str", "get another string"),
  		OPT_NOOP_NOARG(0, "obsolete"),
  		OPT_SET_PTR(0, "default-string", &string,
-			"set string to default", (unsigned long)"default"),
+			"set string to default", (intptr_t)"default"),
Why doesn't OPT_SET_PTR take a pointer?
Good question.  Here's another: OPT_SET_PTR (and OPTION_SET_PTR) has 
only ever been used by test-parse-options; can we remove it?

René
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help