Don't ignore return value from getcwd()
This commit is contained in:
3
Makefile
3
Makefile
@@ -25,7 +25,8 @@ BUILD_VERSION=$(shell git log --abbrev-commit --abbrev=16 | head -1)
|
|||||||
|
|
||||||
CXX=g++
|
CXX=g++
|
||||||
CPP=cpp
|
CPP=cpp
|
||||||
CXXFLAGS=-g3 $(LLVM_CXXFLAGS) -I. -Iobjs/ -Wall $(LLVM_VERSION_DEF) \
|
OPT=-g3
|
||||||
|
CXXFLAGS=$(OPT) $(LLVM_CXXFLAGS) -I. -Iobjs/ -Wall $(LLVM_VERSION_DEF) \
|
||||||
-DBUILD_DATE="\"$(BUILD_DATE)\"" -DBUILD_VERSION="\"$(BUILD_VERSION)\""
|
-DBUILD_DATE="\"$(BUILD_DATE)\"" -DBUILD_VERSION="\"$(BUILD_VERSION)\""
|
||||||
|
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
|
|||||||
3
ispc.cpp
3
ispc.cpp
@@ -353,7 +353,8 @@ Globals::Globals() {
|
|||||||
#ifdef ISPC_IS_WINDOWS
|
#ifdef ISPC_IS_WINDOWS
|
||||||
_getcwd(currentDirectory, sizeof(currentDirectory));
|
_getcwd(currentDirectory, sizeof(currentDirectory));
|
||||||
#else
|
#else
|
||||||
getcwd(currentDirectory, sizeof(currentDirectory));
|
if (getcwd(currentDirectory, sizeof(currentDirectory)) == NULL)
|
||||||
|
FATAL("Current directory path too long!");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user