Summary
Fixes portability issues around %p formatting.
%p expects a void *. Passing other pointer types directly can trigger compiler warnings and is technically not portable.
Changes
01/mem.c: cast pointer argument to (void *).
06/va.c: cast object pointer argument to (void *).
Note
Function pointers are not strictly portable to print with %p; this PR keeps the example simple while reducing avoidable warnings where possible.
Testing
- Compiled affected examples with warnings enabled.
Summary
Fixes portability issues around
%pformatting.%pexpects avoid *. Passing other pointer types directly can trigger compiler warnings and is technically not portable.Changes
01/mem.c: cast pointer argument to(void *).06/va.c: cast object pointer argument to(void *).Note
Function pointers are not strictly portable to print with
%p; this PR keeps the example simple while reducing avoidable warnings where possible.Testing