From: Ciaran Gultnieks Date: Mon, 16 May 2011 20:57:36 +0000 (+0100) Subject: Get rid of ignored return value warning X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=f1bdc6b187836f9741ac0512a0f10414002c647d;p=zefram%2Fminetest%2Fminetest_engine.git Get rid of ignored return value warning --- diff --git a/src/porting.cpp b/src/porting.cpp index e8b13525..7c7ce48e 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -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, '/');