Lint warning in v2.9.1
Posted: Tue Nov 05, 2019 9:05 am
I also get this warning from lint for every file that includes stdlib.h:
c:\projects\nburn\O2/Packet.hpp 10 warning 451: header file 'stdlib.h'
repeatedly included but has no header guard
#include <stdlib.h>
I searched through the GCC include path and found 6 stdlib.h files. Everyone has a header guard except for one. I added a guard but it made no difference. I still get the warnings. Here are the first few lines of the file I modified:
c:\projects\nburn\O2/Packet.hpp 10 warning 451: header file 'stdlib.h'
repeatedly included but has no header guard
#include <stdlib.h>
I searched through the GCC include path and found 6 stdlib.h files. Everyone has a header guard except for one. I added a guard but it made no difference. I still get the warnings. Here are the first few lines of the file I modified:
Code: Select all
#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
#ifndef _STDLIB_H_ // added to remove warning
# include_next <stdlib.h>
#endif
#else
#ifndef _GLIBCXX_STDLIB_H
#define _GLIBCXX_STDLIB_H 1
# include <cstdlib>