libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx |    2 
 solenv/gbuild/platform/com_GCC_defs.mk                              |    4 +
 vcl/osx/a11yselectionwrapper.mm                                     |    4 -
 vcl/osx/a11ytablewrapper.mm                                         |    6 +-
 vcl/osx/a11ytextattributeswrapper.mm                                |    4 -
 vcl/osx/a11ytextwrapper.mm                                          |   22 
+++++-----
 vcl/osx/a11ywrapper.mm                                              |   10 ++--
 vcl/osx/salframe.cxx                                                |    2 
 vcl/unx/gtk3/a11y/gtk3atkutil.cxx                                   |    2 
 vcl/unx/gtk3/gtk3gtkframe.cxx                                       |    2 
 vcl/workben/svpclient.cxx                                           |    2 
 11 files changed, 31 insertions(+), 29 deletions(-)

New commits:
commit 2debad5fbe059b504da14e65719e6d18c1dc4989
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Oct 4 09:59:34 2019 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Oct 4 14:23:17 2019 +0200

    enable -Wunused-exception-parameter on clang
    
    which is useful because our MSVC build will warn about this by default
    
    Change-Id: Idcc0f08b69b6eda4dd2ab010a5fdb674787bebcf
    Reviewed-on: https://gerrit.libreoffice.org/80184
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git 
a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
index 17120e5a4ada..73d945420ab0 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
@@ -386,7 +386,7 @@ void LOKDocViewSigHandlers::window(LOKDocView* pDocView, 
gchar* pPayload, gpoint
                     if (aRectPoints.size() == 4)
                         aGdkRectangle = {aRectPoints[0], aRectPoints[1], 
aRectPoints[2], aRectPoints[3]};
                 }
-                catch(const std::exception& e)
+                catch(const std::exception&)
                 {}
 
                 gtv_lok_dialog_invalidate(GTV_LOK_DIALOG(pDialog), 
aGdkRectangle);
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index 654e75f7de25..fc3ba6958321 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -104,7 +104,9 @@ gb_LinkTarget_LDFLAGS += -Wl,--gc-sections
 endif
 
 ifeq ($(COM_IS_CLANG),TRUE)
-gb_CXXFLAGS_COMMON += -Wimplicit-fallthrough
+gb_CXXFLAGS_COMMON += \
+       -Wimplicit-fallthrough \
+       -Wunused-exception-parameter
 else
 gb_CFLAGS_COMMON += \
     -Wduplicated-cond \
diff --git a/vcl/osx/a11yselectionwrapper.mm b/vcl/osx/a11yselectionwrapper.mm
index cc5b280994bd..163fe27da32c 100644
--- a/vcl/osx/a11yselectionwrapper.mm
+++ b/vcl/osx/a11yselectionwrapper.mm
@@ -42,7 +42,7 @@ using namespace ::com::sun::star::uno;
 
             return children;
 
-        } catch ( Exception& e)
+        } catch ( Exception&)
         {
         }
     }
@@ -79,7 +79,7 @@ using namespace ::com::sun::star::uno;
         for ( unsigned i = 0 ; i < c ; ++i ) {
             xAccessibleSelection -> selectAccessibleChild( [ [ value 
objectAtIndex: i ] accessibleContext ] -> getAccessibleIndexInParent() );
         }
-    } catch ( Exception& e) {
+    } catch ( Exception&) {
     }
 }
 
diff --git a/vcl/osx/a11ytablewrapper.mm b/vcl/osx/a11ytablewrapper.mm
index be26940b275f..e7cd02fcee7e 100644
--- a/vcl/osx/a11ytablewrapper.mm
+++ b/vcl/osx/a11ytablewrapper.mm
@@ -95,7 +95,7 @@ using namespace ::com::sun::star::uno;
             }
             pResult = NSAccessibilityUnignoredChildren( cells );
         }
-        catch (const Exception &e) 
+        catch (const Exception &) 
         {
         }
         [cells autorelease];
@@ -147,7 +147,7 @@ using namespace ::com::sun::star::uno;
                 }
                 pResult = NSAccessibilityUnignoredChildren( cells );
             }
-            catch (const Exception &e) 
+            catch (const Exception &) 
             {
                 pResult = nil;
             }
@@ -186,7 +186,7 @@ using namespace ::com::sun::star::uno;
                 }
                 pResult = NSAccessibilityUnignoredChildren( cells );
             }
-            catch (const Exception &e) 
+            catch (const Exception &) 
             {
                 pResult = nil;
             }
diff --git a/vcl/osx/a11ytextattributeswrapper.mm 
b/vcl/osx/a11ytextattributeswrapper.mm
index f57aaac2680a..c4f5c5567d66 100644
--- a/vcl/osx/a11ytextattributeswrapper.mm
+++ b/vcl/osx/a11ytextattributeswrapper.mm
@@ -347,9 +347,9 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
                 [AquaA11yTextAttributesWrapper addMarkup:[wrapper 
accessibleTextMarkup] toString:string inRange:[origRange rangeValue]];
             [ string endEditing ];
         }
-    } catch ( IllegalArgumentException & e ) {
+    } catch ( IllegalArgumentException & ) {
         // empty
-    } catch ( IndexOutOfBoundsException & e ) {
+    } catch ( IndexOutOfBoundsException & ) {
         // empty
     } catch ( RuntimeException& ) {
         // at least don't crash
diff --git a/vcl/osx/a11ytextwrapper.mm b/vcl/osx/a11ytextwrapper.mm
index a6a060d5fe46..d1a251b1bc74 100644
--- a/vcl/osx/a11ytextwrapper.mm
+++ b/vcl/osx/a11ytextwrapper.mm
@@ -64,7 +64,7 @@ using namespace ::com::sun::star::uno;
         NSRange selectedTextRange = [ [ AquaA11yTextWrapper 
selectedTextRangeAttributeForElement: wrapper ] rangeValue ];
         try {
             [ wrapper accessibleEditableText ] -> replaceText ( 
selectedTextRange.location, selectedTextRange.location + 
selectedTextRange.length, newText );
-        } catch ( const Exception & e ) {
+        } catch ( const Exception & ) {
             // empty
         }
         [ pool release ];
@@ -89,7 +89,7 @@ using namespace ::com::sun::star::uno;
     NSRange range = [ value rangeValue ];
     try {
         [ wrapper accessibleText ] -> setSelection ( range.location, 
range.location + range.length );
-    } catch ( const Exception & e ) {
+    } catch ( const Exception & ) {
         // empty
     }
 }
@@ -155,7 +155,7 @@ using namespace ::com::sun::star::uno;
     try {
         sal_Int32 line = [ wrapper accessibleMultiLineText ] -> 
getLineNumberAtIndex ( static_cast<sal_Int32>([ index intValue ]) );
         lineNumber = [ NSNumber numberWithInt: line ];
-    } catch ( IndexOutOfBoundsException & e ) {
+    } catch ( IndexOutOfBoundsException & ) {
         // empty
     }
     return lineNumber;
@@ -166,7 +166,7 @@ using namespace ::com::sun::star::uno;
     try {
         TextSegment textSegment = [ wrapper accessibleMultiLineText ] -> 
getTextAtLineNumber ( [ line intValue ] );
         range = [ NSValue valueWithRange: NSMakeRange ( 
textSegment.SegmentStart, textSegment.SegmentEnd - textSegment.SegmentStart ) ];
-    } catch ( IndexOutOfBoundsException & e ) {
+    } catch ( IndexOutOfBoundsException & ) {
         // empty
     }
     return range;
@@ -178,7 +178,7 @@ using namespace ::com::sun::star::uno;
     NSMutableString * textRange = [ [ NSMutableString alloc ] init ];
     try {
         [ textRange appendString: CreateNSString ( [ wrapper accessibleText ] 
-> getTextRange ( loc, loc + len ) ) ];
-    } catch ( IndexOutOfBoundsException & e ) {
+    } catch ( IndexOutOfBoundsException & ) {
         // empty
     }
     return textRange;
@@ -193,9 +193,9 @@ using namespace ::com::sun::star::uno;
     try {
         TextSegment textSegment = [ wrapper accessibleText ] -> 
getTextBeforeIndex ( [ index intValue ], AccessibleTextType::GLYPH );
         range = [ NSValue valueWithRange: NSMakeRange ( 
textSegment.SegmentStart, textSegment.SegmentEnd - textSegment.SegmentStart ) ];
-    } catch ( IndexOutOfBoundsException & e ) {
+    } catch ( IndexOutOfBoundsException & ) {
         // empty
-    } catch ( IllegalArgumentException & e ) {
+    } catch ( IllegalArgumentException & ) {
         // empty
     }
     return range;
@@ -246,7 +246,7 @@ using namespace ::com::sun::star::uno;
             rect = [ NSValue valueWithRect: NSMakeRect ( [ nsPos pointValue 
].x, [ nsPos pointValue ].y - size.Y, size.X, size.Y ) ];
             //printf("Range: %s --- Rect: %s\n", [ NSStringFromRange ( [ range 
rangeValue ] ) UTF8String ], [ NSStringFromRect ( [ rect rectValue ] ) 
UTF8String ]);
         }
-    } catch ( IndexOutOfBoundsException & e ) {
+    } catch ( IndexOutOfBoundsException & ) {
         // empty
     }
     return rect;
@@ -257,9 +257,9 @@ using namespace ::com::sun::star::uno;
     try {
         TextSegment textSegment = [ wrapper accessibleText ] -> getTextAtIndex 
( [ index intValue ], AccessibleTextType::ATTRIBUTE_RUN );
         range = [ NSValue valueWithRange: NSMakeRange ( 
textSegment.SegmentStart, textSegment.SegmentEnd - textSegment.SegmentStart ) ];
-    } catch ( IndexOutOfBoundsException & e ) {
+    } catch ( IndexOutOfBoundsException & ) {
         // empty
-    } catch ( IllegalArgumentException & e ) {
+    } catch ( IllegalArgumentException & ) {
         // empty
     }
     return range;
@@ -271,7 +271,7 @@ using namespace ::com::sun::star::uno;
     if ( attrString != nil ) {
         @try {
             rtfData = [ attrString RTFFromRange: [ range rangeValue ] 
documentAttributes: @{NSDocumentTypeDocumentAttribute : NSRTFTextDocumentType} 
];
-        } @catch ( NSException * e) {
+        } @catch ( NSException *) {
             // empty
         }
     }
diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm
index 4b4ac43c4943..5af3d5f3a8ef 100644
--- a/vcl/osx/a11ywrapper.mm
+++ b/vcl/osx/a11ywrapper.mm
@@ -177,7 +177,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject 
*obj) {
         }
         // step 2: create selector
         selector = NSSelectorFromString ( methodName );
-    } @catch ( id exception ) {
+    } @catch ( id  ) {
         selector = static_cast<SEL>(nil);
     }
     [ pool release ];
@@ -368,7 +368,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject 
*obj) {
 
             [ children autorelease ];
             return NSAccessibilityUnignoredChildren( children );
-        } catch (const Exception &e) {
+        } catch (const Exception &) {
             // TODO: Log
             return nil;
         }
@@ -690,11 +690,11 @@ static std::ostream &operator<<(std::ostream &s, NSObject 
*obj) {
             if ( [ self respondsToSelector: methodSelector ] ) {
                 value = [ self performSelector: methodSelector ];
             }
-        } catch ( const DisposedException & e ) {
+        } catch ( const DisposedException & ) {
             mIsTableCell = NO; // just to be sure
             [ AquaA11yFactory removeFromWrapperRepositoryFor: [ self 
accessibleContext ] ];
             return nil;
-        } catch ( const Exception & e ) {
+        } catch ( const Exception & ) {
             // empty
         }
     }
@@ -794,7 +794,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject 
*obj) {
         [ nativeSubrole release ];
         [ title release ];
         return attributeNames;
-    } catch ( DisposedException & e ) { // Object is no longer available
+    } catch ( DisposedException & ) { // Object is no longer available
         if ( nativeSubrole ) {
             [ nativeSubrole release ];
         }
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 8a18aa8e39b9..3057611d12b8 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -211,7 +211,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
         mpNSWindow = [[SalFrameWindow alloc] initWithSalFrame: this];
         mpNSView = [[SalFrameView alloc] initWithSalFrame: this];
     }
-    @catch ( id exception )
+    @catch ( id )
     {
         std::abort();
     }
diff --git a/vcl/unx/gtk3/a11y/gtk3atkutil.cxx 
b/vcl/unx/gtk3/a11y/gtk3atkutil.cxx
index 1b920fe42c9c..ef2f941e526a 100644
--- a/vcl/unx/gtk3/a11y/gtk3atkutil.cxx
+++ b/vcl/unx/gtk3/a11y/gtk3atkutil.cxx
@@ -243,7 +243,7 @@ void DocumentFocusListener::notifyEvent( const 
accessibility::AccessibleEventObj
                 break;
         }
     }
-    catch( const lang::IndexOutOfBoundsException& e )
+    catch( const lang::IndexOutOfBoundsException& )
     {
         g_warning("Focused object has invalid index in parent");
     }
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 25badaec34d3..b37d75ed4ba4 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -4140,7 +4140,7 @@ static 
uno::Reference<accessibility::XAccessibleEditableText> lcl_GetxText(vcl::
         if (xAccessible.is())
             xText = 
FindFocusedEditableText(xAccessible->getAccessibleContext());
     }
-    catch(const uno::Exception& e)
+    catch(const uno::Exception&)
     {
         TOOLS_WARN_EXCEPTION( "vcl.gtk3", "Exception in getting input method 
surrounding text");
     }
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 9ffdbcb38f2c..744b38138239 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -78,7 +78,7 @@ SAL_IMPLEMENT_MAIN()
         ::Main();
         DeInitVCL();
     }
-    catch (const Exception& e)
+    catch (const Exception&)
     {
         TOOLS_WARN_EXCEPTION("vcl", "Fatal");
         return 1;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to