diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-04-03 18:15:12 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-04-03 18:45:20 +0200 |
commit | 9470ee877dabcf133469467a23649066e2bcce5c (patch) | |
tree | d17e347354daaf85ab4c355371dbf31a5cacc2a7 /src/libstore | |
parent | 3dac4c7874b876dc28d522aa4eddd8b4deb64378 (diff) |
Allow open switch-enum in 5 places
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/filetransfer.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/filetransfer.cc b/src/libstore/filetransfer.cc index 1ba399a29..2346accbe 100644 --- a/src/libstore/filetransfer.cc +++ b/src/libstore/filetransfer.cc @@ -407,6 +407,10 @@ struct curlFileTransfer : public FileTransfer err = Misc; } else { // Don't bother retrying on certain cURL errors either + + // Allow selecting a subset of enum values + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wswitch-enum" switch (code) { case CURLE_FAILED_INIT: case CURLE_URL_MALFORMAT: @@ -427,6 +431,7 @@ struct curlFileTransfer : public FileTransfer default: // Shut up warnings break; } + #pragma GCC diagnostic pop } attempt++; |