]> OCCT Git - occt.git/commitdiff
0032057: Coding Rules - eliminate CLang warning -Wunused-parameter when targeting iOS
authorkgv <kgv@opencascade.com>
Thu, 14 Jan 2021 11:09:38 +0000 (14:09 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 14 Jan 2021 16:37:19 +0000 (19:37 +0300)
Cocoa_Window::Cocoa_Window()/OpenGl_Context::SetSwapInterval() have been corrected to suppress warning.

src/Cocoa/Cocoa_Window.mm
src/OpenGl/OpenGl_Context.cxx

index 1f864cf5873f8d08e85337a47bdd1470377b2db8..bd8c2e3c4218ad31c5ebdf792435e5be961930a2 100644 (file)
@@ -111,7 +111,7 @@ Cocoa_Window::Cocoa_Window (const Standard_CString theTitle,
   myYBottom (thePxTop + thePxHeight)
 {
 #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
-  //
+  (void )theTitle;
 #else
   if (thePxWidth <= 0 || thePxHeight <= 0)
   {
index 0e294b4721b0dac1be8cdf4601f4e19688b82a43..4535e8e6c9e418b50738811448e9605b23fdc1d7 100644 (file)
@@ -787,7 +787,7 @@ Standard_Boolean OpenGl_Context::SetSwapInterval (const Standard_Integer theInte
     return Standard_True;
   }
 #elif defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
-  //
+  (void )theInterval; // vsync cannot be turned OFF on iOS
 #elif defined(__APPLE__)
   if (::CGLSetParameter (CGLGetCurrentContext(), kCGLCPSwapInterval, &theInterval) == kCGLNoError)
   {