Skip to content

Ensure we mark non-exported functions and variables as static

Ammar Faizi io-uring 2 versions Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 1 replyApplied
  2. v17 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Add a new patch #1, fix typo.
- Don't export __io_uring_flush_sq(). Instead, make a copy of this function in test/helpers.c.
- Massage the commit message.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/8queue: Fix typo "entererd" -> "entered"src/queue.c+1 -10 replies
2/8queue: Mark `__io_uring_flush_sq()` as staticsrc/queue.c test/helpers.c test/helpers.h +2 more+36 -50 replies
3/8test/io_uring_setup: Remove unused functionstest/io_uring_setup.c+2 -800 replies
4/8ucontext-cp: Remove an unused functionexamples/ucontext-cp.c+2 -170 replies
5/8tests: Mark non-exported functions as statictest/accept-link.c test/accept-reuse.c test/ce593a6c480a.c +15 more+47 -360 replies
6/8ucontext-cp: Mark a non-exported function as staticexamples/ucontext-cp.c+1 -10 replies
7/8test/Makefile: Omit `-Wmissing-prototypes` from the C++ compiler flagstest/Makefile+10 -10 replies
8/8github: Add `-Wmissing-prototypes` for GitHub CI bot.github/workflows/build.yml+4 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH liburing v2 0/8] Ensure we mark non-exported functions and variables as static

From: Ammar Faizi <[email protected]>

Hi Jens,

This is a v2 revision.

This series is a -Wmissing-prototypes enforcement. -Wmissing-prototypes is a clang C compiler flag that warns us if we have functions or variables that are not used outisde the translation unit, but not marked as static.

There are 8 patches in this series:

- Patch #1, is just a typo cleanup.
- Patch #2, core library change, mark __io_uring_flush_sq() as static.
- Patch #3 to patch #7 are the cleanup preparation for -Wmissing-prototypes enforcement.
- Patch #8 is to enforce -Wmissing-prototypes on the GitHub CI robot.

This series has been build-tested each patch with the GitHub CI robot and no breakage is found.

## Changelog

v2:
- Add a new patch #1, fix typo.
- Don't export __io_uring_flush_sq(). Instead, make a copy of this function in test/helpers.c.
- Massage the commit message.

---

Ammar Faizi (8):
queue: Fix typo "entererd" -> "entered"
queue: Mark __io_uring_flush_sq() as static test/io_uring_setup: Remove unused functions
ucontext-cp: Remove an unused function
tests: Mark non-exported functions as static
ucontext-cp: Mark a non-exported function as static test/Makefile: Omit -Wmissing-prototypes from the C++ compiler flags
github: Add -Wmissing-prototypes for GitHub CI bot

 .github/workflows/build.yml |  7 ++--
 examples/ucontext-cp.c      | 19 +--------
 src/queue.c                 |  4 +-
 test/Makefile               | 11 ++++-
 test/accept-link.c          |  2 +-
 test/accept-reuse.c         |  9 ++--
 test/ce593a6c480a.c         |  4 +-
 test/defer-taskrun.c        |  2 +-
 test/exit-no-cleanup.c      |  2 +-
 test/hardlink.c             |  2 +-
 test/helpers.c              | 33 +++++++++++++++
 test/helpers.h              |  2 +
 test/io_uring_passthrough.c |  2 -
 test/io_uring_setup.c       | 83 ++-----------------------------------
 test/iopoll.c               |  2 -
 test/link_drain.c           |  2 +-
 test/multicqes_drain.c      | 27 +++++++-----
 test/nvme.h                 |  3 +-
 test/poll-link.c            |  2 +-
 test/poll-mshot-overflow.c  |  2 +-
 test/read-before-exit.c     |  2 +-
 test/ring-leak2.c           |  2 +-
 test/sq-poll-kthread.c      |  2 +-
 test/sqpoll-cancel-hang.c   |  2 +-
 test/symlink.c              |  3 +-
 test/timeout-new.c          | 12 ++++--
 26 files changed, 101 insertions(+), 142 deletions(-)

base-commit: 636b6bdaa8d84f1b5318e27d1e4ffa86361ae66d

Signature · 1 line
Ammar Faizi