SQLite Forum

Incorrect C code in sqlite3.c

Incorrect C code in sqlite3.c

(1) By albert on 2020-05-24 12:15:31 [link] [source]

In the file sqlite3.c (version sqlite-autoconf-3320000) we see at line 494 the code:

and at line 503:
though when these values are set through the defines at line 16509 and 13514 as:
    #    define SQLITE_MUTEX_PTHREADS 
    #  define SQLITE_NOINLINE

this results in invalid C code. It is suggested to replace the #if statements with #ifdef statements and remove the


Same accounts also for line 497:

and line 485:

this might also be necessary on other places where empty defines are defined.

(2) By Richard Hipp (drh) on 2020-05-24 12:43:20 in reply to 1 [source]

What C compiler are you using that this causes problems for?

(3) By albert on 2020-05-24 12:47:31 in reply to 2 [link] [source]

I didn't use a compiler, but I used doxygen to create some documentation and here I got an error message.

When looking into the issue I realized that the used construct could give the incorrect C code (an alternative to removing the code might be to issue an #error).