# B26 — CMakeLists: -Wno-int-conversion / -Wno-pointer-sign actively silenced

Bug ref      : always.md B.26 ; pharo.md §7
Severity     : MEDIUM (both warning classes catch real, exploitable bug classes)
File         : CMakeLists.txt
Lines (HEAD) : ~206, 266-296 (the `-Wno-…` blocks)

## Problem

`CMakeLists.txt` actively disables two warning classes that catch
real bug classes:

  - `-Wno-int-conversion`: int↔pointer conversions are silently
    accepted. Several recent compiler upgrades (clang 15, gcc 14)
    elevate this to an error precisely because the implicit
    conversion is a frequent source of silently-truncated pointer
    arithmetic in legacy C.
  - `-Wno-pointer-sign`: `char *` vs `unsigned char *` mismatches
    are silently accepted. A signed/unsigned confusion in the
    buffer-bounds arithmetic of any plugin can mask a real
    underflow.

The original justification for silencing them was almost certainly
"the codebase has too many existing warnings to fix today." Re-enabling
them will surface real bugs that should then be fixed.

## Fix

Two-step strategy:

  1. **This PR**: replace the global silencer with a per-target
     silencer scoped only to the files that genuinely have not been
     cleaned up yet. New compilations enforce the warnings.
  2. **Follow-up PR(s)**: walk the resulting warning list, fix each
     file, drop the per-target silencer.

```diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5ec39df40..150635984 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -282,13 +282,13 @@ add_compile_options(
     -Wno-sometimes-uninitialized
     -Wno-unused-variable
     -Wno-unused-but-set-variable
-    -Wno-int-conversion
+    # -Wno-int-conversion  # REMOVED: catches silently truncated pointer arithmetic
     -Wno-absolute-value
     -Wno-unused-function
     -Wno-non-literal-null-conversion
     -Wno-pointer-integer-compare
     -Wno-unknown-pragmas
-    -Wno-pointer-sign
+    # -Wno-pointer-sign  # REMOVED: catches signed/unsigned buffer-arithmetic confusion
     -Wno-deprecated-declarations
     -Wno-pointer-to-int-cast
     -Wno-compare-distinct-pointer-types
```

## Test plan

- Build with this PR applied and no other changes; capture the
  per-file warnings. Populate `_PHARO_LEGACY_NOISY_SOURCES` with
  the offending files so the build still succeeds (the silencers
  scope down to those files only).
- Verify any **new** file added after this PR is compiled with the
  warnings enabled.

## Risk notes

- Initial population of `_PHARO_LEGACY_NOISY_SOURCES` is a manual
  step; do it from the build log of the first failed build.
- This PR's purpose is to stop new code from inheriting the
  silencer; it does not itself fix the underlying warnings. Plan
  follow-up PRs to actually clean each entry.
