]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix chdir result warning
authorSage Weil <sage@newdream.net>
Thu, 6 Oct 2011 16:40:09 +0000 (09:40 -0700)
committerSage Weil <sage@newdream.net>
Thu, 6 Oct 2011 16:40:09 +0000 (09:40 -0700)
warning: rgw/rgw_main.cc:265: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result

Signed-off-by: Sage Weil <sage@newdream.net>
src/rgw/rgw_main.cc

index 1944013aacdd490e702215d5ebaa270e9599d7c1..b97ad0f6256844435c0f96c7f5aff154243e4d4b 100644 (file)
@@ -262,7 +262,10 @@ int main(int argc, const char **argv)
     close(0);
     close(1);
     close(2);
-    chdir("/");
+    int r = chdir("/");
+    if (r < 0) {
+      dout(0) << "weird, i couldn't chdir to /" << dendl;
+    }
   }
   
   common_init_finish(g_ceph_context);