frama -c __nonnull宏重新定义警告

时间:2016-04-19 06:38:52

标签: frama-c

当我启动frama-c的值插件时,我会多次发出相同的警告:

/Users/philippeantoine/.opam/4.02.3/bin/frama-c -val myprog.c
In file included from /Users/philippeantoine/.opam/4.02.3/share/frama-c/libc/stdint.h:27:
/Users/philippeantoine/.opam/4.02.3/share/frama-c/libc/features.h:63:9: warning: '__nonnull' macro redefined [-Wmacro-redefined]

#define __nonnull(args...)
    ^
<built-in>:286:9: note: previous definition is here
#define __nonnull _Nonnull
    ^
1 warning generated.
/var/folders/rj/vl86bl2n6cgdjg7m7tszcvm40000gn/T/ppannot48d4bd.c:543:9: warning: '__nonnull' macro redefined [-Wmacro-redefined]
#define __nonnull(args...) 
    ^
/var/folders/rj/vl86bl2n6cgdjg7m7tszcvm40000gn/T/ppannot48d4bd.c:286:9: note: previous definition is here
#define __nonnull _Nonnull
    ^
1 warning generated.

以前有没有人经历过这些? 避免这些并看到有意义的警告的最佳方法是什么?

我用简单的代码得到了这个:

#include <stdlib.h>
int main (){
    char * test = malloc(10);
    test[0] = 'a';
}

0 个答案:

没有答案