Skip to content

Commit

Permalink
Remove unused exception parameter from videoinfra/xs/worker/execution…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jun 20, 2024
1 parent 9315c5e commit abe3fd7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/CodecUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/RushClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit abe3fd7

Please sign in to comment.