I have a Borland C++Builder 6.0 project. In this project I use SQLite library. I use sqlite3.c file (SQLite amalgamation 3.7.11). All works fine. But when I'm enabling CodeGuard in C++Builder, CodeGuard gives me numerous errors in sqlite3.c. Like 'access overrun' 'arithmetic overrun' 'resource leak'.

I tried to insert 100000 records into my database in the project. It took about 130 seconds to do this and the memory used by the process did not increase at all. So I think there's no memory leak actually.

My question is: Should I take CodeGuard errors in sqlite seriously? Or can I just ignore them? Maybe they are false positives? Or C++Builder 6 compiler is not suitable for SQlite?

2

There are 2 best solutions below

0
On

SQLite is really solid code. BCB 6 is a really old compiler.

I would suggest that the SQLite code is ok but the compiler is either generating bad code or false positives in CodeGuard.

0
On

I got rid of those warnings by compiling with the SQLITE_WIN32_MALLOC option defined, which configures SQLite for using the Win32 native heap API instead of malloc().