Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9bd1cd35
Commit
9bd1cd35
authored
Jan 13, 2007
by
Eli Zaretskii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(maybe_resize_hash_table): Copy new size of hash table into EMACS_INT to avoid
GCC warnings.
parent
3aef3c0a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
src/ChangeLog
src/ChangeLog
+10
-0
src/fns.c
src/fns.c
+5
-1
No files found.
src/ChangeLog
View file @
9bd1cd35
2007-01-13 Eli Zaretskii <eliz@gnu.org>
* fns.c (maybe_resize_hash_table): Copy new size of hash table
into EMACS_INT to avoid GCC warnings.
* editfns.c (Fuser_uid, Fuser_real_uid): Copy values returned by
geteuid and getuid into EMACS_INT to avoid GCC warnings.
* dired.c (Ffile_attributes): Fix last change.
2007-01-12 Eli Zaretskii <eliz@gnu.org>
* dired.c (Ffile_attributes): Copy some members of `struct stat'
...
...
src/fns.c
View file @
9bd1cd35
...
...
@@ -4668,6 +4668,7 @@ maybe_resize_hash_table (h)
{
int
old_size
=
HASH_TABLE_SIZE
(
h
);
int
i
,
new_size
,
index_size
;
EMACS_INT
nsize
;
if
(
INTEGERP
(
h
->
rehash_size
))
new_size
=
old_size
+
XFASTINT
(
h
->
rehash_size
);
...
...
@@ -4677,7 +4678,10 @@ maybe_resize_hash_table (h)
index_size
=
next_almost_prime
((
int
)
(
new_size
/
XFLOATINT
(
h
->
rehash_threshold
)));
if
(
max
(
index_size
,
2
*
new_size
)
>
MOST_POSITIVE_FIXNUM
)
/* Assignment to EMACS_INT stops GCC whining about limited range
of data type. */
nsize
=
max
(
index_size
,
2
*
new_size
);
if
(
nsize
>
MOST_POSITIVE_FIXNUM
)
error
(
"Hash table too large to resize"
);
h
->
key_and_value
=
larger_vector
(
h
->
key_and_value
,
2
*
new_size
,
Qnil
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment