diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-04 09:59:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-04 14:23:17 +0200 |
commit | 2debad5fbe059b504da14e65719e6d18c1dc4989 (patch) | |
tree | 6989e1e13dd806952f387a591ef77ee288f57569 /vcl/osx | |
parent | 316557d6f4fe8a15112b39f3c808dda38cce018c (diff) |
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.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/osx')
-rw-r--r-- | vcl/osx/a11yselectionwrapper.mm | 4 | ||||
-rw-r--r-- | vcl/osx/a11ytablewrapper.mm | 6 | ||||
-rw-r--r-- | vcl/osx/a11ytextattributeswrapper.mm | 4 | ||||
-rw-r--r-- | vcl/osx/a11ytextwrapper.mm | 22 | ||||
-rw-r--r-- | vcl/osx/a11ywrapper.mm | 10 | ||||
-rw-r--r-- | vcl/osx/salframe.cxx | 2 |
6 files changed, 24 insertions, 24 deletions
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(); } |