Run Microsoft Analyzer over dmd source code
Vladimir Panteleev
vladimir at thecybershadow.net
Sun Aug 7 12:11:35 PDT 2011
On Sun, 07 Aug 2011 21:45:45 +0300, bearophile <bearophileHUGS at lycos.com>
wrote:
> Vladimir Panteleev:
>
>> http://thecybershadow.net/d/vcanalysis/
>
> As with (first report of) Clang I see that assert(p); p->foo... are
> marked as "Dereferencing NULL pointer".
Ah, that would probably be in files that #include <assert.h> instead of
"tassert.h". (Odd that Microsoft's code analyzer doesn't understand the
standard assert facility.) I'll try fixing that.
> Do you know the purpose of this?
> os->name = strdup(name);
> warning C4996: 'strdup': The POSIX name for this item is deprecated.
> Instead, use the ISO C++ conformant name: _strdup. See online help for
> details. c:\Program Files (x86)\Microsoft Visual Studio
> 10.0\VC\include\string.h(238) : see declaration of 'strdup'
I don't think there's more to it than what the message says - a
recommendation to use the ISO C++ conformant name instead of the
deprecated POSIX name.
--
Best regards,
Vladimir mailto:vladimir at thecybershadow.net
More information about the Digitalmars-d
mailing list