ソースを参照

fix a warning about enum comparison

Julius Pfrommer 8 年 前
コミット
d8c0e3e154
共有1 個のファイルを変更した3 個の追加2 個の削除を含む
  1. 3 2
      src/client/ua_client.c

+ 3 - 2
src/client/ua_client.c

@@ -469,8 +469,9 @@ static UA_StatusCode EndpointsHandshake(UA_Client *client) {
                 continue;
 
             /* UA_CLIENTAUTHENTICATION_NONE == UA_USERTOKENTYPE_ANONYMOUS
-             * UA_CLIENTAUTHENTICATION_USERNAME == UA_USERTOKENTYPE_USERNAME */
-            if(client->authenticationMethod != userToken->tokenType)
+             * UA_CLIENTAUTHENTICATION_USERNAME == UA_USERTOKENTYPE_USERNAME
+             * TODO: Check equivalence for other types when adding the support */
+            if((int)client->authenticationMethod != (int)userToken->tokenType)
                 continue;
 
             /* Endpoint with matching usertokenpolicy found */