repo.or.cz
/
cursedutils.git
/
commitdiff
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
raw
|
patch
|
inline
|
side by side
(parent:
a61b1af
)
Fix GCC's -Wsign-conversion error
author
Alessio Chiapperini
<
[email protected]
>
Wed, 6 Apr 2022 13:03:40 +0000
(6 15:03 +0200)
committer
Alessio Chiapperini
<
[email protected]
>
Wed, 6 Apr 2022 13:03:40 +0000
(6 15:03 +0200)
We can cast the offset to size_t since we never pass a negative offset
to the function.
src/cat/cat.c
patch
|
blob
|
blame
|
history
diff --git
a/src/cat/cat.c
b/src/cat/cat.c
index
6082437
..
b97d187
100644
(file)
--- a/
src/cat/cat.c
+++ b/
src/cat/cat.c
@@
-65,7
+65,7
@@
print_rev(char *buf, off_t off)
{
char dst[N];
int ret;
- size_t blen = off % N ? off % N : N;
+ size_t blen = off % N ?
(size_t)
off % N : N;
ret = 0;
while (off > 0) {