Update .gitignore and fix 32-bit build
cover Update .gitignore and fix 32-bit build
- Add test/file-verify to .gitignore.
- Fix 32-bit build
----------------------------------------------------------------
Ammar Faizi (2):
.gitignore: add test/file-verify
test/file-verify: fix 32-bit build -Werror=shift-count-overflow
.gitignore | 1 + test/file-verify.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
PATCH 1/2 .gitignore: add `test/file-verify`
--- .gitignore | 1 + 1 file changed, 1 insertion(+)
.gitignore +1 -0
@@ -54,6 +54,7 @@ /test/fc2a85cb02ef-test /test/file-register /test/file-update +test/file-verify /test/files-exit-hang-poll /test/files-exit-hang-timeout /test/fixed-link
Signature · 1 line
2.30.2
PATCH v2 1/2 .gitignore: add `test/file-verify`
--- .gitignore | 1 + 1 file changed, 1 insertion(+)
v2: Forgot leading slash.
.gitignore +1 -0
@@ -54,6 +54,7 @@ /test/fc2a85cb02ef-test /test/file-register /test/file-update +/test/file-verify /test/files-exit-hang-poll /test/files-exit-hang-timeout /test/fixed-link
Signature · 1 line
2.30.2
PATCH 2/2 test/file-verify: fix 32-bit build -Werror=shift-count-overflow
In reply to Ammar Faizioff_t may not always be 64-bit in size.
```
file-verify.c: In function 'test':
file-verify.c:193:26: error: left shift count >= width of type [-Werror=shift-count-overflow]
sqe->user_data = (off << 32) | i;
^
cc1: all warnings being treated as errors
Makefile:164: recipe for target 'file-verify' failed
make[1]: *** [file-verify] Error 1
make[1]: Leaving directory '/root/liburing/test'
Makefile:12: recipe for target 'all' failed
make: *** [all] Error 2
```Fix this by using (uint64_t) cast.
--- test/file-verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
test/file-verify.c +1 -1
@@ -190,7 +190,7 @@ static int test(struct io_uring *ring, const char *fname, int buffered,else io_uring_prep_read (sqe, fd, buf[i], this, off); } - sqe->user_data = (off <<32 ) | i; + sqe->user_data = ((uint64_t )off <<32 ) | i; off += this; left -= this; pending++;
Signature · 1 line
2.30.2
Quoted 11 lines · Ammar Faizi
- Add test/file-verify to .gitignore.
- Fix 32-bit build----------------------------------------------------------------
Ammar Faizi (2):
.gitignore: addtest/file-verify
test/file-verify: fix 32-bit build -Werror=shift-count-overflow.gitignore | 1 + test/file-verify.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
Applied, thanks.
Signature · 1 line
Jens Axboe