ravthan / all-eyes

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

"scan-build -V --use-cc=/usr/bin/clang make" in src/ae/daemon exposed bug in aemsg.c:119 #129

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Good static analysis tool.  Found the following bug:

======================
/usr/bin/clang -Wstrict-prototypes -Wall -Werror -Wformat=2  -static -g 
-pedantic -std=c99 -D _GNU_SOURCE -I../include -I. -c aemsg.c
aemsg.c:119:29: error: argument to 'sizeof' in 'memset' call is the same 
expression as the
      destination; did you mean to dereference it? [-Werror,-Wsizeof-pointer-memaccess]
    memset(aeMsg, 0, sizeof(aeMsg));
           ~~~~~            ^~~~~
1 error generated.
make: *** [test] Error 1
============================

ravi.

Original issue reported on code.google.com by ravt...@gmail.com on 3 Dec 2012 at 3:54

GoogleCodeExporter commented 8 years ago
Fixed,
ravi.

r1000

Original comment by ravt...@gmail.com on 3 Dec 2012 at 3:59

GoogleCodeExporter commented 8 years ago
Verified with unit testing

Original comment by tbrt....@gmail.com on 9 Dec 2012 at 9:24