Skip to content

Commit

Permalink
Merge pull request #4804 from nextcloud/feature/enableMoreWarningsAls…
Browse files Browse the repository at this point in the history
…oForGcc

Feature/enable more warnings also for gcc
  • Loading branch information
Camila authored Aug 10, 2022
2 parents 55fda4e + 5c7b6e7 commit ddcb834
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/Warnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/propagateremotedeleteencryptedrootfolder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void PropagateRemoteDeleteEncryptedRootFolder::slotDeleteNestedRemoteItemFinishe
if (_nestedItems.size() == 0) {
// we wait for all _nestedItems' DeleteJobs to finish, and then - fail if any of those jobs has failed
if (networkError() != QNetworkReply::NetworkError::NoError || _item->_httpErrorCode != 0) {
const int errorCode = networkError() != QNetworkReply::NetworkError::NoError ? networkError() : _item->_httpErrorCode;
const auto errorCode = (networkError() != QNetworkReply::NetworkError::NoError ? static_cast<int>(networkError()) : _item->_httpErrorCode);
qCCritical(PROPAGATE_REMOVE_ENCRYPTED_ROOTFOLDER) << "Delete of nested items finished with error" << errorCode << ". Failing the entire sequence.";
taskFailed();
return;
Expand Down

0 comments on commit ddcb834

Please sign in to comment.