diff --git a/CMakeLists.txt b/CMakeLists.txt index 82d0ed626..f689445dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,12 +5,6 @@ project(WombatFS) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) include(address_sanitizer) -add_definitions( - #-Werror - #--analyze - #-Os # GCC size optimization flag -) - if(NOT MSVC) add_definitions( -std=c++11 @@ -19,6 +13,9 @@ if(NOT MSVC) -fno-exceptions -fno-rtti -Wsign-compare + #-Werror + #--analyze + #-Os # GCC size optimization flag ) endif(NOT MSVC) diff --git a/src/_memops.hpp b/src/_memops.hpp index 44696bbf3..08b9994f7 100644 --- a/src/_memops.hpp +++ b/src/_memops.hpp @@ -5,8 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef WOMBAT_FS_MEMOPS_HPP -#define WOMBAT_FS_MEMOPS_HPP +#pragma once namespace wombat { namespace fs { @@ -17,5 +16,3 @@ void memset(void *ptr, char val, int size); } } - -#endif diff --git a/src/_strops.hpp b/src/_strops.hpp index a90aac2f0..f2ba703c3 100644 --- a/src/_strops.hpp +++ b/src/_strops.hpp @@ -5,8 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef WOMBAT_FS_STROPS_HPP -#define WOMBAT_FS_STROPS_HPP +#pragma once namespace wombat { namespace fs { @@ -15,5 +14,3 @@ int strcmp(const char *str1, const char *str2); } } - -#endif diff --git a/src/_types.hpp b/src/_types.hpp index c5fe2a944..bf1e89cfe 100644 --- a/src/_types.hpp +++ b/src/_types.hpp @@ -5,8 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef WOMBAT_FS_TYPES_HPP -#define WOMBAT_FS_TYPES_HPP +#pragma #define offsetof(st, m) ((size_t)(&((st *)0)->m)) @@ -35,5 +34,3 @@ typedef uint32_t size_t; } } - -#endif diff --git a/src/filestore.hpp b/src/filestore.hpp index bf4798540..aa626503b 100644 --- a/src/filestore.hpp +++ b/src/filestore.hpp @@ -5,8 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef WOMBAT_FS_FILESTORE_HPP -#define WOMBAT_FS_FILESTORE_HPP +#pragma once #include "_memops.hpp" #include "_types.hpp" @@ -382,5 +381,3 @@ typedef FileStore FileStore64; } } - -#endif diff --git a/src/filesystem.hpp b/src/filesystem.hpp index b936d5766..e1a98da26 100644 --- a/src/filesystem.hpp +++ b/src/filesystem.hpp @@ -5,8 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef WOMBAT_FS_FILESYSTEM_HPP -#define WOMBAT_FS_FILESYSTEM_HPP +#pragma once #include "_memops.hpp" #include "_strops.hpp" @@ -48,5 +47,3 @@ typedef FileSystem FileSystem64; } } - -#endif