diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-02 09:01:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-02 13:21:40 +0200 |
commit | b26ff81a6f8f5ad99bba153cf57bef68fd03930d (patch) | |
tree | 70411312f58b1ad6a0c0d3cc72ecaea417233a25 /unoidl/source/unoidl-check.cxx | |
parent | 62172db2d71fdc49a3ad9c177b8635353b90a7eb (diff) |
use [[noreturn]] instead of asserts that badUsage exits
Change-Id: I927434290b02b6cc0386b1e0038cd8385a762249
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166996
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'unoidl/source/unoidl-check.cxx')
-rw-r--r-- | unoidl/source/unoidl-check.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/unoidl/source/unoidl-check.cxx b/unoidl/source/unoidl-check.cxx index b2d57766f968..e836befbae13 100644 --- a/unoidl/source/unoidl-check.cxx +++ b/unoidl/source/unoidl-check.cxx @@ -72,7 +72,7 @@ static bool operator ==( namespace { -void badUsage() { +[[noreturn]] void badUsage() { std::cerr << "Usage:" << std::endl << std::endl << (" unoidl-check [--ignore-unpublished] [<extra registries A>]" @@ -106,7 +106,6 @@ bool getArgument( if (delimiter == nullptr) { badUsage(); } - assert(delimiter && "badUsage exits otherwise"); *delimiter = true; return false; } |