OSInfo ignores deprecation warnings on macOS #1314

Open
opened 2026-02-20 20:58:47 -05:00 by deekerman · 0 comments
Owner

Originally created by @mkrautz on GitHub (Dec 31, 2017).

PR mumble-voip/mumble#3289 adds an ignore pragma for deprecation warnings in OSInfo.cpp.

We should revisit this in the future and refactor OSInfo approrpiately.

Some things to keep in mind:

  • The deprecation ignore is for the Gestalt API, which is marked as deprecated as of macOS 10.8.
  • However, a replacement API is not available until macOS 10.10.
  • The replacement API is [[NSProcessInfo processInfo] operatingSystemVersion].
  • Since the replacement API is Objective-C, we can't call it from our OSInfo.cpp file, so to avoid calling the deprecated API, we'd have to make (at least the macOS part) of OSInfo an Objective-C++ file (.mm).
Originally created by @mkrautz on GitHub (Dec 31, 2017). PR mumble-voip/mumble#3289 adds an ignore pragma for deprecation warnings in OSInfo.cpp. We should revisit this in the future and refactor OSInfo approrpiately. Some things to keep in mind: - The deprecation ignore is for the Gestalt API, which is marked as deprecated as of macOS 10.8. - However, a replacement API is not available until macOS 10.10. - The replacement API is `[[NSProcessInfo processInfo] operatingSystemVersion]`. - Since the replacement API is Objective-C, we can't call it from our OSInfo.cpp file, so to avoid calling the deprecated API, we'd have to make (at least the macOS part) of OSInfo an Objective-C++ file (.mm).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mumble-mumble-voip#1314
No description provided.