소스 검색

Restrict the visibility of these two to the TU

No need to make these global

Before
$ nm ./CMakeFiles/open62541-plugins.dir/plugins/ua_config_default.c.o
000000000000089d t addDefaultNetworkLayers
...
0000000000000000 D usernamePasswords
0000000000000060 R usernamePasswordsSize

After
$ nm ./CMakeFiles/open62541-plugins.dir/plugins/ua_config_default.c.o
0000000000000000 d usernamePasswords
0000000000000060 r usernamePasswordsSize
Frank Meerkoetter 6 년 전
부모
커밋
e32595ecc4
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      plugins/ua_config_default.c

+ 2 - 2
plugins/ua_config_default.c

@@ -97,8 +97,8 @@ UA_ServerConfig_set_customHostname(UA_ServerConfig *config, const UA_String cust
     UA_String_copy(&customHostname, &config->customHostname);
 }
 
-const size_t usernamePasswordsSize = 2;
-UA_UsernamePasswordLogin usernamePasswords[2] = {
+static const size_t usernamePasswordsSize = 2;
+static UA_UsernamePasswordLogin usernamePasswords[2] = {
     {UA_STRING_STATIC("user1"), UA_STRING_STATIC("password")},
     {UA_STRING_STATIC("user2"), UA_STRING_STATIC("password1")}};