Since compiler warnings were disabled with -w, these two important warnings went unnoticed,
gpx.c:5445:38: warning: comparison of constant 213 with expression of type
'char' is always true [-Wtautological-constant-out-of-range-compare]
if(gpx->buffer.in[0] != 0xD5) {
gpx.c:5460:42: warning: comparison of constant 213 with expression of type
'char' is always false [-Wtautological-constant-out-of-range-compare]
if(gpx->buffer.in[0] == 0xD5) break;
Since compiler warnings were disabled with -w, these two important warnings went unnoticed,
gpx.c:5445:38: warning: comparison of constant 213 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare] if(gpx->buffer.in[0] != 0xD5) { gpx.c:5460:42: warning: comparison of constant 213 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare] if(gpx->buffer.in[0] == 0xD5) break;
Ooops. A fix is to cast to (unsigned char)