On Sun, Mar 30, 2014 at 10:29:04AM +0200, Andreas Schwab wrote:
> Junio C Hamano writes:
>
> > As OPT_SET_PTR() is about setting the pointer value to intptr_t defval,
> > a follow-up patch on top of this fix (see attached) may not be a bad
> > thing to have, but that patch alone will not fix thi
Junio C Hamano writes:
> As OPT_SET_PTR() is about setting the pointer value to intptr_t defval,
> a follow-up patch on top of this fix (see attached) may not be a bad
> thing to have, but that patch alone will not fix this issue without
> dropping the unneeded and unwanted cast to unsigned long.
Marat Radchenko writes:
> On 64-bit MSVC, pointers are 64 bit but `long` is only 32.
> Thus, casting string to `unsigned long`, which is redundand on other
> platforms, throws away important bits and when later cast to `intptr_t`
> results in corrupt pointer.
>
> This patch fixes test-parse-optio
Am 29.03.2014 22:34, schrieb Andreas Schwab:
Marat Radchenko writes:
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', NU
Marat Radchenko writes:
> 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 strin
On 64-bit MSVC, pointers are 64 bit but `long` is only 32.
Thus, casting string to `unsigned long`, which is redundand on other
platforms, throws away important bits and when later cast to `intptr_t`
results in corrupt pointer.
This patch fixes test-parse-options by replacing harming cast with
cor
6 matches
Mail list logo