You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/07/13 16:16:00 UTC

[jira] [Commented] (GEODE-8340) Enforce Switch compiler warnings as errors

    [ https://issues.apache.org/jira/browse/GEODE-8340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17156820#comment-17156820 ] 

ASF GitHub Bot commented on GEODE-8340:
---------------------------------------

pdxcodemonkey commented on a change in pull request #625:
URL: https://github.com/apache/geode-native/pull/625#discussion_r453764965



##########
File path: cppcache/src/ExceptionTypes.cpp
##########
@@ -297,7 +297,25 @@ const std::string& getThreadLocalExceptionMessage();
       PutAllPartialResultException ex(message);
       throw ex;
     }
-    default: {
+    case GF_NOERR:

Review comment:
       Same as above - adding a zillion case statements doesn't make code clearer.

##########
File path: cppcache/include/geode/DataInput.hpp
##########
@@ -313,7 +313,53 @@ class APACHE_GEODE_EXPORT DataInput {
         // empty string
         break;
       // TODO: What's the right response here?
-      default:
+      case internal::DSCode::FixedIDDefault:

Review comment:
       Wow I really really don't like this.  Is there anything we can do to fix the warning _besides_ adding ~65 case statements?  This makes the code less readable, not more IMO.

##########
File path: cppcache/src/TcrMessage.cpp
##########
@@ -1015,6 +1015,36 @@ void TcrMessage::processChunk(const std::vector<uint8_t>& chunk, int32_t len,
         break;
       }
       // fall-through for other cases
+      if (m_chunkedResult != nullptr) {

Review comment:
       What's this block of code doing?  I don't immediately see a place where it was removed/moved, so is it new?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Enforce Switch compiler warnings as errors
> ------------------------------------------
>
>                 Key: GEODE-8340
>                 URL: https://issues.apache.org/jira/browse/GEODE-8340
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>            Reporter: Michael Oleske
>            Priority: Major
>
> Given I compile the code without exempting no-switch-enum and no-implicit-fallthrough and no-covered-switch-default
> Then it should compile
> Note - was marked as a todo, seems reasonable to tackle all these at once



--
This message was sent by Atlassian Jira
(v8.3.4#803005)