From abe3fd7fc3d9bb3462765d5e41b80cff52e6c949 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Thu, 20 Jun 2024 14:17:33 -0700 Subject: [PATCH] Remove unused exception parameter from videoinfra/xs/worker/execution/TaskSubprocess.cpp Summary: `-Wunused-exception-parameter` has identified an unused exception parameter. This diff removes it. This: ``` try { ... } catch (exception& e) { // no use of e } ``` should instead be written as ``` } catch (exception&) { ``` If the code compiles, this is safe to land. Reviewed By: dmm-fb Differential Revision: D58830669 fbshipit-source-id: 85f8c3611570b11615b35bca9cc908fd93e3284d --- src/CodecUtils.cpp | 12 ++++++------ src/RushClient.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/CodecUtils.cpp b/src/CodecUtils.cpp index 1e41b2c..280f2ab 100644 --- a/src/CodecUtils.cpp +++ b/src/CodecUtils.cpp @@ -31,7 +31,7 @@ int isAnnexb(uint8_t* data, int length) { return 1; } return 0; - } catch (const std::out_of_range& error) { + } catch (const std::out_of_range&) { return 1; } return 1; @@ -51,7 +51,7 @@ int isAvccFit(uint8_t* data, int length) { } readCursor.advance(naluLength); } while (readCursor.available()); - } catch (const std::out_of_range& ex) { + } catch (const std::out_of_range&) { return 0; } return 1; @@ -79,7 +79,7 @@ int isHEVCConfigRecord(uint8_t* data, size_t length) { return 1; } return 0; - } catch (const std::out_of_range& error) { + } catch (const std::out_of_range&) { return 1; } } @@ -171,7 +171,7 @@ ssize_t getParameterFromConfigRecordHEVC( readCursor.advance(naluLength); } } - } catch (const std::out_of_range& error) { + } catch (const std::out_of_range&) { std::cerr << "Error processing HEVC Config Record" << std::endl; return -1; } @@ -248,7 +248,7 @@ ssize_t getPrameterFromConfigRecordH264( readCursor.advance(naluLength); } } - } catch (const std::out_of_range& error) { + } catch (const std::out_of_range&) { std::cerr << "Could not parse H264 Config Record" << std::endl; return -1; } @@ -273,7 +273,7 @@ int shouldProcessExtradata( try { naluLength = 0; readCursor.readBE(naluLength); - } catch (const std::out_of_range& error) { + } catch (const std::out_of_range&) { std::cerr << "Invalid NALU length" << std::endl; return -1; } diff --git a/src/RushClient.cpp b/src/RushClient.cpp index e8e305b..f6a151e 100644 --- a/src/RushClient.cpp +++ b/src/RushClient.cpp @@ -183,7 +183,7 @@ int RushClient::onRecvStreamData( break; } processed = length; - } catch (const std::out_of_range& error) { + } catch (const std::out_of_range&) { processed = 0; }