Cloosen-Calories / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

C4826 due to casting pointers to ULONG64 on x86 #607

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile breakpad code targeting x86, using /Wall or with C4826 turned on 
(this warning is off by default. In my case I am using VS 2010 (VC 10.0).

What is the expected output? What do you see instead?
I am getting a warning: 
breakpad/src/client/windows/handler/exception_handler.h(93) :
warning C4826: Conversion from 'const void *' to 'ULONG64' is sign-extended. 
This may cause unexpected runtime behavior.

The offending code is this line: 
return ptr == reinterpret_cast<ULONG64>(other);

Please provide any additional information below.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384242(v=vs.85).aspx

Perhaps the struct AppMemory could use a portable data type for |ptr| or at the 
minimum the warning could be disabled using #pragma.

Original issue reported on code.google.com by so...@chromium.org on 24 Sep 2014 at 6:26

GoogleCodeExporter commented 9 years ago

Original comment by thestig@chromium.org on 24 Sep 2014 at 6:30