forked from xen-project/xen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e820.c: In function ‘clip_to_limit’: .../xen/include/asm/string.h:10:26: error: ‘__builtin_memmove’ offset [-16, -36] is out of the bounds [0, 20484] of object ‘e820’ with type ‘struct e820map’ [-Werror=array-bounds] 10 | #define memmove(d, s, n) __builtin_memmove(d, s, n) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ e820.c:404:13: note: in expansion of macro ‘memmove’ 404 | memmove(&e820.map[i], &e820.map[i+1], | ^~~~~~~ e820.c:36:16: note: ‘e820’ declared here 36 | struct e820map e820; | ^~~~ While I can't see where the negative offsets would come from, converting the loop index to unsigned type helps. Take the opportunity and also convert several other local variables and copy_e820_map()'s second parameter to unsigned int (and bool in one case). Reported-by: Charles Arnold <[email protected]> Signed-off-by: Jan Beulich <[email protected]> Reviewed-by: Roger Pau Monné <[email protected]> Reviewed-by: Wei Liu <[email protected]> Acked-by: Andrew Cooper <[email protected]>
- Loading branch information
Showing
1 changed file
with
14 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters