Parcourir la source

[1387] avoid using 'sun' for a variable name. not declare sockaddr_un
as const.

JINMEI Tatuya il y a 13 ans
Parent
commit
0c8c0f808a
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/lib/xfr/tests/client_test.cc

+ 2 - 2
src/lib/xfr/tests/client_test.cc

@@ -26,8 +26,8 @@ namespace {
 
 TEST(ClientTest, connetFile) {
     // File path is too long
-    const struct sockaddr_un sun;
-    EXPECT_THROW(XfroutClient(string(sizeof(sun.sun_path), 'x')).connect(),
+    struct sockaddr_un s;     // can't be const; some compiler complains
+    EXPECT_THROW(XfroutClient(string(sizeof(s.sun_path), 'x')).connect(),
                  XfroutError);
 
     // File doesn't exist (we assume the file "no_such_file" doesn't exist)