diff options
-rw-r--r-- | src/hash.c | 6 | ||||
-rw-r--r-- | src/lex.l | 4 | ||||
-rw-r--r-- | src/proto.h | 1 |
3 files changed, 6 insertions, 5 deletions
@@ -33,11 +33,11 @@ _gdbm_hash (datum key) int index; /* Used to cycle through random values. */ /* Set the initial value from key. */ - value = 0x238F13AF * key.dsize; + value = 0x238F13AFu * key.dsize; for (index = 0; index < key.dsize; index++) - value = (value + (key.dptr[index] << (index*5 % 24))) & 0x7FFFFFFF; + value = (value + (key.dptr[index] << ((unsigned) index * 5 % 24))) & 0x7FFFFFFF; - value = (1103515243 * value + 12345) & 0x7FFFFFFF; + value = (1103515243u * value + 12345) & 0x7FFFFFFF; /* Return the value. */ return((int) value); @@ -136,11 +136,11 @@ input_context_pop (void) cp = context_tos->parent; free (context_tos); context_tos = cp; + yy_delete_buffer (YY_CURRENT_BUFFER); if (!cp) return 1; - + yylloc = cp->locus; - yy_delete_buffer (YY_CURRENT_BUFFER); yy_switch_to_buffer (cp->buf); return 0; diff --git a/src/proto.h b/src/proto.h index ab34d75..2171250 100644 --- a/src/proto.h +++ b/src/proto.h @@ -127,6 +127,7 @@ gdbm_file_sync (GDBM_FILE dbf) GDBM_SET_ERRNO (dbf, GDBM_FILE_SYNC_ERROR, TRUE); return 1; } + return 0; #else sync (); sync (); |