Enable deprecation warnings and suppress a small handful that have no modern replacements
parent
e5ccf7a2a3
commit
a46d4f0f69
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ if (DARWIN)
|
|||
llkeyboardmacosx.cpp
|
||||
llwindowmacosx.cpp
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "-Wno-deprecated-declarations -fpascal-strings"
|
||||
COMPILE_FLAGS "-fpascal-strings"
|
||||
)
|
||||
endif (DARWIN)
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue