git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] reftable: fix -Wsign-compare warnings
@ 2025-01-16 10:08 Patrick Steinhardt
  2025-01-16 10:08 ` [PATCH 01/10] meson: stop disabling -Wsign-compare Patrick Steinhardt
                   ` (11 more replies)
  0 siblings, 12 replies; 28+ messages in thread
From: Patrick Steinhardt @ 2025-01-16 10:08 UTC (permalink / raw)
  To: git

Hi,

during the last steps of converting the reftable codebase to become a
standalone library I noticed that the new -Wsign-compare warnings
created a bit of a problem due to the `DISABLE_SIGN_COMPARE_WARNINGS`
macro that we started using. As a consequence I wasn't able to easily
drop "git-compat-util.h" anymore. This patch series is thus addresses
the issue by fixing all sign comparison warnings in the reftable
library.

Thanks!

Patrick

---
Patrick Steinhardt (10):
      meson: stop disabling -Wsign-compare
      reftable/record: drop unused `print` function pointer
      reftable/record: handle overflows when decoding varints
      reftable/basics: adjust `common_prefix_size()` to return `size_t`
      reftable/basics: adjust `hash_size()` to return `uint32_t`
      reftable/block: adapt header and footer size to return a `size_t`
      reftable/block: adjust type of the restart length
      reftable/blocksource: adjust type of the block length
      reftable/blocksource: adjust `read_block()` to return `ssize_t`
      reftable: address trivial -Wsign-compare warnings

 meson.build                         |   1 -
 reftable/basics.c                   |  10 ++--
 reftable/basics.h                   |   4 +-
 reftable/block.c                    |  20 +++----
 reftable/block.h                    |  14 ++---
 reftable/blocksource.c              |   8 +--
 reftable/reader.c                   |  32 +++++-----
 reftable/reader.h                   |   6 +-
 reftable/record.c                   | 116 ++++++++++++++++--------------------
 reftable/record.h                   |  23 +++----
 reftable/reftable-blocksource.h     |  13 ++--
 reftable/reftable-record.h          |   4 +-
 reftable/reftable-writer.h          |   2 +-
 reftable/stack.c                    |  12 ++--
 reftable/system.h                   |   2 -
 reftable/writer.c                   |   7 +--
 t/unit-tests/t-reftable-basics.c    |   2 +-
 t/unit-tests/t-reftable-readwrite.c |   2 +-
 t/unit-tests/t-reftable-record.c    |  19 +++++-
 19 files changed, 148 insertions(+), 149 deletions(-)


---
base-commit: 757161efcca150a9a96b312d9e780a071e601a03
change-id: 20250116-b4-pks-reftable-sign-compare-8eaabae74c06


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2025-01-20 16:17 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-16 10:08 [PATCH 00/10] reftable: fix -Wsign-compare warnings Patrick Steinhardt
2025-01-16 10:08 ` [PATCH 01/10] meson: stop disabling -Wsign-compare Patrick Steinhardt
2025-01-16 10:08 ` [PATCH 02/10] reftable/record: drop unused `print` function pointer Patrick Steinhardt
2025-01-16 10:08 ` [PATCH 03/10] reftable/record: handle overflows when decoding varints Patrick Steinhardt
2025-01-20  9:47   ` Karthik Nayak
2025-01-20 15:09     ` Patrick Steinhardt
2025-01-16 10:08 ` [PATCH 04/10] reftable/basics: adjust `common_prefix_size()` to return `size_t` Patrick Steinhardt
2025-01-16 10:08 ` [PATCH 05/10] reftable/basics: adjust `hash_size()` to return `uint32_t` Patrick Steinhardt
2025-01-16 10:08 ` [PATCH 06/10] reftable/block: adapt header and footer size to return a `size_t` Patrick Steinhardt
2025-01-16 10:08 ` [PATCH 07/10] reftable/block: adjust type of the restart length Patrick Steinhardt
2025-01-16 10:08 ` [PATCH 08/10] reftable/blocksource: adjust type of the block length Patrick Steinhardt
2025-01-16 10:08 ` [PATCH 09/10] reftable/blocksource: adjust `read_block()` to return `ssize_t` Patrick Steinhardt
2025-01-16 10:08 ` [PATCH 10/10] reftable: address trivial -Wsign-compare warnings Patrick Steinhardt
2025-01-16 22:12   ` Junio C Hamano
2025-01-17  6:10     ` Patrick Steinhardt
2025-01-20 10:07 ` [PATCH 00/10] reftable: fix " Karthik Nayak
2025-01-20 15:10   ` Patrick Steinhardt
2025-01-20 16:17 ` [PATCH v2 " Patrick Steinhardt
2025-01-20 16:17   ` [PATCH v2 01/10] meson: stop disabling -Wsign-compare Patrick Steinhardt
2025-01-20 16:17   ` [PATCH v2 02/10] reftable/record: drop unused `print` function pointer Patrick Steinhardt
2025-01-20 16:17   ` [PATCH v2 03/10] reftable/record: handle overflows when decoding varints Patrick Steinhardt
2025-01-20 16:17   ` [PATCH v2 04/10] reftable/basics: adjust `common_prefix_size()` to return `size_t` Patrick Steinhardt
2025-01-20 16:17   ` [PATCH v2 05/10] reftable/basics: adjust `hash_size()` to return `uint32_t` Patrick Steinhardt
2025-01-20 16:17   ` [PATCH v2 06/10] reftable/block: adapt header and footer size to return a `size_t` Patrick Steinhardt
2025-01-20 16:17   ` [PATCH v2 07/10] reftable/block: adjust type of the restart length Patrick Steinhardt
2025-01-20 16:17   ` [PATCH v2 08/10] reftable/blocksource: adjust type of the block length Patrick Steinhardt
2025-01-20 16:17   ` [PATCH v2 09/10] reftable/blocksource: adjust `read_block()` to return `ssize_t` Patrick Steinhardt
2025-01-20 16:17   ` [PATCH v2 10/10] reftable: address trivial -Wsign-compare warnings Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).