Skip to content

Improve C++ code: do not use int - #2071

Merged
ibc merged 3 commits into
v3from
worker-do-not-use-int
Nov 20, 2026
Merged

ibc merged 3 commits into
v3from
worker-do-not-use-int

Conversation

@ibc

@ibc ibc commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Details

  • Do not use int in worker/src and worker/include because its width depends on the platform: Use a fixed-width type that matches the values it is compared or operated with.

Bonus Tracks

  • Add ms_log_dev_level Meson option (0 to 3) to set the dev logging level of every source file that doesn't define its own MS_LOG_DEV_LEVEL.
  • mediasoup-worker.yaml CI: Build with -Dms_log_dev_level=3 in jobs that enable all Meson options. This way we also compile the worker with full debug logs and verify that it compiles without errors or warnings.
  • mediasoup-worker.yaml CI: In jobs with -Dms_log_dev_level=3, write the test output to a log file and upload it as an artifact if the tests fail.

# Details

- Do not use `int` in `worker/src` and `worker/include` because its width depends on the platform: Use a fixed-width type that matches the values it is compared or operated with.

## Bonus Tracks

- Add `ms_log_dev_level` Meson option (0 to 3) to set the dev logging level of every source file that doesn't define its own `MS_LOG_DEV_LEVEL`.
  - Example: `MESON_ARGS="-Dms_log_dev_level=3" make`.
- `mediasoup-worker.yaml` CI: Build with `-Dms_log_dev_level=3` in jobs that enable all Meson options.
- `mediasoup-worker.yaml` CI: In jobs with `-Dms_log_dev_level=3`, write the test output to a log file and upload it as an artifact if the tests fail.
@ibc
ibc merged commit baa83b7 into v3 Nov 20, 2026
52 checks passed
@ibc
ibc deleted the worker-do-not-use-int branch November 20, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants