From: Hans de Goede Date: Fri, 22 Apr 2011 17:56:00 +0000 (+0200) Subject: Check return value of chdir X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6df0255360f1780bda1f574cdef7a3f4e1f62dea;p=quix0rs-blobwars.git Check return value of chdir Not checking this causes a warning when building under Fedora which becomes an error because of -Werror. --- diff --git a/src/main.cpp b/src/main.cpp index e24da31..c5e9ba8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -104,7 +104,11 @@ int main(int argc, char *argv[]) #endif #if RELEASE - chdir(PAKLOCATION); + if (chdir(PAKLOCATION)) + { + perror("Could not chdir to " PAKLOCATION ":"); + return 1; + } #endif config.engine = &engine;