SQLite Forum

Weird warning on the Xcode/OSX
Login
What version of `sqlite3.c` are you using? Can you check if it has guards around the definitions of MIN and MAX? At line 14247 in my copy (v3.33.0), there's:

```c
#ifndef MIN
# define MIN(A,B) ((A)<(B)?(A):(B))
#endif
#ifndef MAX
# define MAX(A,B) ((A)>(B)?(A):(B))
#endif
```

That came from `sqliteInt.h`. There's a similar, guarded definition at line 166006 (that seems to come from `fts3Int.h`) and another at 187836 (that comes from `rtree.c`). The latter both use `x` and `y` instead of `A` and `B`. Finally, at line 207899 (originating from `fts5.c`), there is what at first glance appears to be an _unguarded_ pair of definitions:

```c
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
#define MAX(x,y) (((x) > (y)) ? (x) : (y))
```

but there's a `#ifndef SQLITE_AMALGAMATION` wrapping the section they're in, which I ass.u.me means they'll be excluded when compiling `sqlite3.c` (but does this mean they could clash with a prior definition if `fts5.c` is compiled outside the amalgamation?)