Skip to content

Commit c68038e

Browse files
barrbrainjrn
authored andcommitted
vcs-svn: suppress a signed/unsigned comparison warning
The preceding code checks that view->max_off is nonnegative and (off + width) fits in an off_t, so this code is already safe. Signed-off-by: David Barr <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]>
1 parent 6a0b443 commit c68038e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vcs-svn/sliding_window.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ int move_window(struct sliding_view *view, off_t off, size_t width)
5454
return -1;
5555
if (off < view->off || off + width < view->off + view->width)
5656
return error("invalid delta: window slides left");
57-
if (view->max_off >= 0 && view->max_off < off + width)
57+
if (view->max_off >= 0 && view->max_off < off + (off_t) width)
5858
return error("delta preimage ends early");
5959

6060
file_offset = view->off + view->buf.len;

0 commit comments

Comments
 (0)