diff options
author | Yuval Lifshitz <ylifshit@redhat.com> | 2023-12-17 17:27:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-17 17:27:27 +0100 |
commit | f74e11dc8ee7bd13e2f8858ae66dc119b18fdce6 (patch) | |
tree | f2651c104d9dcd3a1737524b8f70fee37beacba6 | |
parent | Merge pull request #54547 from idryomov/wip-53897 (diff) | |
parent | rgw: Add coverity annotations for uncaught exceptions in standalone binaries (diff) | |
download | ceph-f74e11dc8ee7bd13e2f8858ae66dc119b18fdce6.tar.xz ceph-f74e11dc8ee7bd13e2f8858ae66dc119b18fdce6.zip |
Merge pull request #53902 from vedanshbhartia/coverity_except_main
rgw: Add coverity annotations for uncaught exceptions in standalone binaries
reviewed-by: yuvalif
-rw-r--r-- | src/rgw/driver/dbstore/dbstore_main.cc | 3 | ||||
-rw-r--r-- | src/rgw/rgw_admin.cc | 3 | ||||
-rw-r--r-- | src/rgw/rgw_es_main.cc | 3 | ||||
-rw-r--r-- | src/rgw/rgw_jsonparser.cc | 4 | ||||
-rw-r--r-- | src/rgw/rgw_main.cc | 4 | ||||
-rw-r--r-- | src/rgw/rgw_multiparser.cc | 4 | ||||
-rw-r--r-- | src/rgw/rgw_object_expirer.cc | 3 | ||||
-rw-r--r-- | src/rgw/rgw_polparser.cc | 3 | ||||
-rw-r--r-- | src/rgw/rgw_token.cc | 3 |
9 files changed, 29 insertions, 1 deletions
diff --git a/src/rgw/driver/dbstore/dbstore_main.cc b/src/rgw/driver/dbstore/dbstore_main.cc index 4fff38ced27..46d4106ca43 100644 --- a/src/rgw/driver/dbstore/dbstore_main.cc +++ b/src/rgw/driver/dbstore/dbstore_main.cc @@ -119,6 +119,9 @@ void* process(void *arg) return 0; } +// This has an uncaught exception. Even if the exception is caught, the program +// would need to be terminated, so the warning is simply suppressed. +// coverity[root_function:SUPPRESS] int main(int argc, char *argv[]) { string tenant = "Redhat"; diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 2288399d4d8..3d817c6039b 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -3292,6 +3292,9 @@ void init_realm_param(CephContext *cct, string& var, std::optional<string>& opt_ } } +// This has an uncaught exception. Even if the exception is caught, the program +// would need to be terminated, so the warning is simply suppressed. +// coverity[root_function:SUPPRESS] int main(int argc, const char **argv) { auto args = argv_to_vec(argc, argv); diff --git a/src/rgw/rgw_es_main.cc b/src/rgw/rgw_es_main.cc index 6cfbc935292..d84f9ecadd5 100644 --- a/src/rgw/rgw_es_main.cc +++ b/src/rgw/rgw_es_main.cc @@ -14,6 +14,9 @@ using namespace std; +// This has an uncaught exception. Even if the exception is caught, the program +// would need to be terminated, so the warning is simply suppressed. +// coverity[root_function:SUPPRESS] int main(int argc, char *argv[]) { auto args = argv_to_vec(argc, argv); diff --git a/src/rgw/rgw_jsonparser.cc b/src/rgw/rgw_jsonparser.cc index 6541630b286..a6c99c63989 100644 --- a/src/rgw/rgw_jsonparser.cc +++ b/src/rgw/rgw_jsonparser.cc @@ -56,7 +56,9 @@ struct UserInfo { } }; - +// This has an uncaught exception. Even if the exception is caught, the program +// would need to be terminated, so the warning is simply suppressed. +// coverity[root_function:SUPPRESS] int main(int argc, char **argv) { JSONParser parser; diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 57407b43481..be211e28c92 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -57,7 +57,11 @@ static int usage() /* * start up the RADOS connection and then handle HTTP messages as they come in + * + * This has an uncaught exception. Even if the exception is caught, the program + * would need to be terminated, so the warning is simply suppressed. */ +// coverity[root_function:SUPPRESS] int main(int argc, char *argv[]) { int r{0}; diff --git a/src/rgw/rgw_multiparser.cc b/src/rgw/rgw_multiparser.cc index a8778abd9a0..c7a37213c4d 100644 --- a/src/rgw/rgw_multiparser.cc +++ b/src/rgw/rgw_multiparser.cc @@ -14,6 +14,10 @@ using namespace std; + +// This has an uncaught exception. Even if the exception is caught, the program +// would need to be terminated, so the warning is simply suppressed. +// coverity[root_function:SUPPRESS] int main(int argc, char **argv) { RGWMultiXMLParser parser; diff --git a/src/rgw/rgw_object_expirer.cc b/src/rgw/rgw_object_expirer.cc index 7a49fc8d161..0470b1a6e6f 100644 --- a/src/rgw/rgw_object_expirer.cc +++ b/src/rgw/rgw_object_expirer.cc @@ -51,6 +51,9 @@ static void usage() generic_server_usage(); } +// This has an uncaught exception. Even if the exception is caught, the program +// would need to be terminated, so the warning is simply suppressed. +// coverity[root_function:SUPPRESS] int main(const int argc, const char **argv) { auto args = argv_to_vec(argc, argv); diff --git a/src/rgw/rgw_polparser.cc b/src/rgw/rgw_polparser.cc index c26862478e9..f81eda7fe97 100644 --- a/src/rgw/rgw_polparser.cc +++ b/src/rgw/rgw_polparser.cc @@ -50,6 +50,9 @@ void usage(std::string_view cmdname) << std::endl; } +// This has an uncaught exception. Even if the exception is caught, the program +// would need to be terminated, so the warning is simply suppressed. +// coverity[root_function:SUPPRESS] int main(int argc, const char** argv) { std::string_view cmdname = argv[0]; diff --git a/src/rgw/rgw_token.cc b/src/rgw/rgw_token.cc index 999d46e0e22..8ffac69c831 100644 --- a/src/rgw/rgw_token.cc +++ b/src/rgw/rgw_token.cc @@ -60,6 +60,9 @@ void usage() generic_client_usage(); } +// This has an uncaught exception. Even if the exception is caught, the program +// would need to be terminated, so the warning is simply suppressed. +// coverity[root_function:SUPPRESS] int main(int argc, char **argv) { auto args = argv_to_vec(argc, argv); |