Skip to content

Commit

Permalink
Add a check for argc > 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Nov 6, 2023
1 parent 1dadc9a commit d2a8419
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/root_io/read_frame_root.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ int main(int argc, char* argv[]) {
inputFile = argv[1];
assertBuildVersion = false;
}
else if (argc > 2) {
std::cout << "Wrong number of arguments" << std::endl;
std::cout << "Usage: " << argv[0] << " FILE" << std::endl;
return 1;
}

return read_frames<podio::ROOTFrameReader>(inputFile, assertBuildVersion) +
test_frame_aux_info<podio::ROOTFrameReader>(inputFile);
Expand Down

0 comments on commit d2a8419

Please sign in to comment.