summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/cmake/00-Common.cmake2
-rw-r--r--indra/llcommon/llmd5.cpp9
-rw-r--r--indra/llwindow/CMakeLists.txt2
-rw-r--r--indra/llwindow/llopenglview-objc.mm20
-rw-r--r--indra/llwindow/llwindowmacosx-objc.mm10
-rw-r--r--indra/llwindow/llwindowmacosx.cpp10
-rw-r--r--indra/newview/llviewerwindow.cpp8
7 files changed, 59 insertions, 2 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index c1f46a25a3..7ca58c7ea0 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -184,7 +184,7 @@ if (LINUX OR DARWIN)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
# libstdc++ headers contain deprecated declarations that fail on clang
# macOS currently has many deprecated calls
- add_compile_options(-Wno-unused-local-typedef -Wno-deprecated-declarations)
+ add_compile_options(-Wno-unused-local-typedef)
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp
index e999b8f597..c806c0ab2e 100644
--- a/indra/llcommon/llmd5.cpp
+++ b/indra/llcommon/llmd5.cpp
@@ -255,6 +255,11 @@ void LLMD5::raw_digest(unsigned char* s) const
memcpy(s, digest, 16); /* Flawfinder: ignore */
}
+#if LL_DARWIN
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
void LLMD5::hex_digest(char* s) const
{
if (!finalized)
@@ -273,6 +278,10 @@ void LLMD5::hex_digest(char* s) const
s[32] = '\0';
}
+#if LL_DARWIN
+#pragma clang diagnostic push
+#endif
+
std::ostream& operator<<(std::ostream& stream, const LLMD5& context)
{
char s[33]; /* Flawfinder: ignore */
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index 01a7c303a9..08b3df87ab 100644
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -107,7 +107,7 @@ if (DARWIN)
llkeyboardmacosx.cpp
llwindowmacosx.cpp
PROPERTIES
- COMPILE_FLAGS "-Wno-deprecated-declarations -fpascal-strings"
+ COMPILE_FLAGS "-fpascal-strings"
)
endif (DARWIN)
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index 3808418112..f3aa164f92 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -212,6 +212,12 @@ attributedStringInfo getSegments(NSAttributedString *str)
return [self initWithFrame:[self bounds] withSamples:samples andVsync:vsync];
}
+#if LL_DARWIN
+// For setView and opengl deprecation
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
- (id) initWithFrame:(NSRect)frame withSamples:(NSUInteger)samples andVsync:(BOOL)vsync
{
[self registerForDraggedTypes:[NSArray arrayWithObject:NSPasteboardTypeURL]];
@@ -301,6 +307,10 @@ attributedStringInfo getSegments(NSAttributedString *str)
return true;
}
+#if LL_DARWIN
+#pragma clang diagnostic pop
+#endif
+
- (CGLContextObj)getCGLContextObj
{
NSOpenGLContext *ctx = [self openGLContext];
@@ -647,6 +657,12 @@ attributedStringInfo getSegments(NSAttributedString *str)
}
}
+#if LL_DARWIN
+// For commitEditing deprecation
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
- (void)commitCurrentPreedit
{
if (mHasMarkedText)
@@ -658,6 +674,10 @@ attributedStringInfo getSegments(NSAttributedString *str)
}
}
+#if LL_DARWIN
+#pragma clang diagnostic pop
+#endif
+
- (void)unmarkText
{
[[self inputContext] discardMarkedText];
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index 7f87111570..42cd95be5d 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -162,11 +162,21 @@ void showNSCursor()
[NSCursor unhide];
}
+#if LL_DARWIN
+// For CGCursorIsVisible no replacement in modern API
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
bool isCGCursorVisible()
{
return CGCursorIsVisible();
}
+#if LL_DARWIN
+#pragma clang diagnostic pop
+#endif
+
void hideNSCursorTillMove(bool hide)
{
[NSCursor setHiddenUntilMouseMoves:hide];
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index b3f9697867..0e03b4e883 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -1224,6 +1224,12 @@ void LLWindowMacOSX::setMouseClipping( bool b )
adjustCursorDecouple();
}
+#if LL_DARWIN
+// For CGSetLocalEventsSuppressionInterval there is no replacement in modern API
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
bool LLWindowMacOSX::setCursorPosition(const LLCoordWindow position)
{
bool result = false;
@@ -1261,6 +1267,10 @@ bool LLWindowMacOSX::setCursorPosition(const LLCoordWindow position)
return result;
}
+#if LL_DARWIN
+#pragma clang diagnostic pop
+#endif
+
bool LLWindowMacOSX::getCursorPosition(LLCoordWindow *position)
{
float cursor_point[2];
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index fdd75f9c6c..2f943b4836 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -784,8 +784,16 @@ public:
addText(xpos, ypos, "Projection Matrix");
ypos += y_inc;
+#if LL_DARWIN
+// For sprintf deprecation
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
// View last column is always <0,0,0,1>
MATRIX_ROW_F32_TO_STR(gGLModelView, 12,camera_lines[3]); addText(xpos, ypos, std::string(camera_lines[3])); ypos += y_inc;
+#if LL_DARWIN
+#pragma clang diagnostic pop
+#endif
MATRIX_ROW_N32_TO_STR(gGLModelView, 8,camera_lines[2]); addText(xpos, ypos, std::string(camera_lines[2])); ypos += y_inc;
MATRIX_ROW_N32_TO_STR(gGLModelView, 4,camera_lines[1]); addText(xpos, ypos, std::string(camera_lines[1])); ypos += y_inc; mBackRectCamera2.mTop = ypos + 2;
MATRIX_ROW_N32_TO_STR(gGLModelView, 0,camera_lines[0]); addText(xpos, ypos, std::string(camera_lines[0])); ypos += y_inc;