aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-01-09 11:58:49 +0200
committerSergey Poznyakoff <gray@gnu.org>2021-01-09 12:37:40 +0200
commit0c38baeca4d8caeb2b16faaf42acd61f4e72bde7 (patch)
tree312bf472c59acb4cfc7540530db244dd7a07ec7c
parentc42044e7eda48707809c4176a9bb5f6e479fdc92 (diff)
downloadgdbm-0c38baeca4d8caeb2b16faaf42acd61f4e72bde7.tar.gz
gdbm-0c38baeca4d8caeb2b16faaf42acd61f4e72bde7.tar.bz2
Minor changes
* src/hash.c (_gdbm_hash): Suppress address sanitizer errors. * src/proto.h (gdbm_file_sync): Add missing return. * src/lex.l (input_context_pop): Delete current buffer when tos is reached.
-rw-r--r--src/hash.c6
-rw-r--r--src/lex.l4
-rw-r--r--src/proto.h1
3 files changed, 6 insertions, 5 deletions
diff --git a/src/hash.c b/src/hash.c
index 21d15dc..52fbc82 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -35,7 +35,7 @@ _gdbm_hash (datum key)
35 /* Set the initial value from key. */ 35 /* Set the initial value from key. */
36 value = 0x238F13AF * key.dsize; 36 value = 0x238F13AFu * key.dsize;
37 for (index = 0; index < key.dsize; index++) 37 for (index = 0; index < key.dsize; index++)
38 value = (value + (key.dptr[index] << (index*5 % 24))) & 0x7FFFFFFF; 38 value = (value + (key.dptr[index] << ((unsigned) index * 5 % 24))) & 0x7FFFFFFF;
39 39
40 value = (1103515243 * value + 12345) & 0x7FFFFFFF; 40 value = (1103515243u * value + 12345) & 0x7FFFFFFF;
41 41
diff --git a/src/lex.l b/src/lex.l
index 7840794..7faf046 100644
--- a/src/lex.l
+++ b/src/lex.l
@@ -138,7 +138,7 @@ input_context_pop (void)
138 context_tos = cp; 138 context_tos = cp;
139 yy_delete_buffer (YY_CURRENT_BUFFER);
139 if (!cp) 140 if (!cp)
140 return 1; 141 return 1;
141 142
142 yylloc = cp->locus; 143 yylloc = cp->locus;
143 yy_delete_buffer (YY_CURRENT_BUFFER);
144 yy_switch_to_buffer (cp->buf); 144 yy_switch_to_buffer (cp->buf);
diff --git a/src/proto.h b/src/proto.h
index ab34d75..2171250 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -129,2 +129,3 @@ gdbm_file_sync (GDBM_FILE dbf)
129 } 129 }
130 return 0;
130#else 131#else

Return to:

Send suggestions and report system problems to the System administrator.