Get rid of ignored return value warning
authorCiaran Gultnieks <ciaran@ciarang.com>
Mon, 16 May 2011 20:57:36 +0000 (21:57 +0100)
committerCiaran Gultnieks <ciaran@ciarang.com>
Mon, 16 May 2011 20:57:36 +0000 (21:57 +0100)
src/porting.cpp

index e8b1352558bb7737399e79513177182f7361cde2..7c7ce48eae3a62265bab4856e867334daeff3f95 100644 (file)
@@ -136,7 +136,7 @@ void initializePaths()
        char buf[BUFSIZ];
        memset(buf, 0, BUFSIZ);
        // Get path to executable
-       readlink("/proc/self/exe", buf, BUFSIZ-1);
+       assert(readlink("/proc/self/exe", buf, BUFSIZ-1) != -1);
        
        pathRemoveFile(buf, '/');
 
@@ -200,7 +200,7 @@ void initializePaths()
        char buf[BUFSIZ];
        memset(buf, 0, BUFSIZ);
        // Get path to executable
-       readlink("/proc/self/exe", buf, BUFSIZ-1);
+       assert(readlink("/proc/self/exe", buf, BUFSIZ-1) != -1);
        
        pathRemoveFile(buf, '/');