Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Sep 2012 14:49:33 +0200
From:      Erik Cederstrand <erik@cederstrand.dk>
To:        FreeBSD Hackers <hackers@FreeBSD.org>
Subject:   Allocator sizeof operand mismatch
Message-ID:  <1C0A3745-9C1D-488B-99DE-CA85D1F59EB9@cederstrand.dk>

next in thread | raw e-mail | index | archive | help
Clang Analyzer reports about 100 cases of "Allocator sizeof operand =
mismatch", for example:

=
http://scan.freebsd.your.org/freebsd-head/sbin.umount/2012-09-23-amd64/rep=
ort-k4ThD9.html#EndPath

The reports seem to be valid, but I'm no export. I can work out that the =
above should probably be fixed by changing "sizeof(int)" to =
"sizeof(char)" and that it incidentally works anyway since both types =
have the same size in most cases. But I probably won't detect if the =
error is somewhere else than the arguments to malloc/calloc.

Is someone willing to help me fix these, or should I start filing PR's =
with patches?

Thanks,
Erik=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1C0A3745-9C1D-488B-99DE-CA85D1F59EB9>