You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ae2612a
Browse filesBrowse the repository at this point in the historyBrowse files
* Fix compiler warnings in macOS core build and bundled addons
Clears the mechanical warnings reported by a clean `make Release` of
libs/openFrameworks on macOS (clang, -Wall). No behavior or API changes.
Core (libs/openFrameworks):
- ofEvents.cpp, ofFpsCounter.cpp: reorder constructor initializer lists
to match member declaration order (-Wreorder-ctor).
- ofColor.h: explicit static_cast<float> in ofColor_::limit() for the
integer specializations (-Wimplicit-const-int-float-conversion). The
value is unchanged; the cast only makes the existing rounding explicit.
- ofPixels.cpp: remove unused local `bytesPerPixel`.
- ofFileUtils.cpp: remove unused static `natural()` comparator.
- ofLog.h: scope a -Wformat-security suppression around
ofVAArgsToString(), which intentionally forwards a caller-supplied
printf format. Existing format semantics are preserved.
- ofAVFoundationVideoPlayer.m: remove unused `currentSampleRate`.
- ofAVEngineSoundPlayer.mm: remove an unused `error` in init; mark
variables that are only used in the iOS (#ifndef TARGET_OSX) paths
as [[maybe_unused]] so iOS builds are unaffected.
Bundled addons:
- ofxOpenCv: add using-declarations (ofBaseDraws::draw in
ofxCvContourFinder, ofxCvImage::setRoiFromPixels in ofxCvFloatImage)
to stop hidden overloaded virtuals (-Woverloaded-virtual).
- ofxAssimp: remove unused private field mOfTexType; mark the
set-but-unused bFinishedTransition [[maybe_unused]] (referenced only
in commented-out logging).
- ofxSvg: remove unused local bFoundValidNextChar.
Intentionally not addressed here:
- -Wliteral-conversion in ofAVEngineSoundPlayer.mm (dispatch_time is
given float seconds, so the delay is currently 0 ns); fixing it would
change interruption timing.
- OpenGL deprecation warnings (CVOpenGLTexture*, NSOpenGLContext) in
ofAVFoundationPlayer.mm and ofSystemUtils.cpp; no replacement exists
while core renders with OpenGL.
- libs/utf8 and other external libraries.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* Fix dispatch_time delays and silence OpenGL deprecation warnings on macOS
Finishes the macOS core warning cleanup started in the previous commit.
A clean `make Release` of libs/openFrameworks now reports no warnings
outside libs/utf8.
ofAVEngineSoundPlayer.mm: dispatch_time() takes a delta in nanoseconds
(int64_t), but four call sites passed float seconds (0.033f, 0.017f,
0.3f, 0.3f). The float was truncated to 0, so these "delayed" blocks
actually ran on the next main-queue turn (-Wliteral-conversion). They
now use the intended delays via NSEC_PER_MSEC:
- 0.033f -> 33 * NSEC_PER_MSEC (interruption handling)
- 0.017f -> 17 * NSEC_PER_MSEC (restore play count)
- 0.3f -> 300 * NSEC_PER_MSEC (two play() retries while the
session is interrupted / config
change pending)
This is a real behavior change: these blocks are now actually deferred.
Audio interruption / route change / media-services-reset handling
should be exercised in the sound examples.
ofAVFoundationPlayer.mm, ofSystemUtils.cpp: the remaining
-Wdeprecated-declarations are Apple's OpenGL deprecations
(CVOpenGLTexture*, NSOpenGLContext). openFrameworks core renders with
OpenGL and there is no drop-in replacement, so wrap just those calls in
scoped `#pragma clang diagnostic push/ignored/pop` rather than disabling
the warning for the whole file or build.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Dan Moore <dan@makitdoathing.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
0 commit comments