From 6beff502e90fc2d09ead72f4968236bbf13ed9f2 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Thu, 21 Jun 2018 11:35:57 -0500 Subject: Changed license to BSD-3-Clause For better compatibility with GPL v2 With permissions from: - aldot - Sim4n6 - jrast --- lfs_util.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'lfs_util.h') diff --git a/lfs_util.h b/lfs_util.h index 3527ce6..51005dc 100644 --- a/lfs_util.h +++ b/lfs_util.h @@ -1,19 +1,8 @@ /* * lfs utility functions * - * Copyright (c) 2017 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright (c) 2017, Arm Limited. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause */ #ifndef LFS_UTIL_H #define LFS_UTIL_H -- cgit v1.2.3 From 51346b8bf4146cc145c2cefce9928b03fa9f4c8c Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 8 Jun 2018 11:24:27 +1000 Subject: Fixed shadowed variable warnings - Fixed shadowed variable warnings in lfs_dir_find. - Fixed unused parameter warnings when LFS_NO_MALLOC is enabled. - Added extra warning flags to CFLAGS. - Updated tests so they don't shadow the "size" variable for -Wshadow --- lfs_util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lfs_util.h') diff --git a/lfs_util.h b/lfs_util.h index 51005dc..d61c545 100644 --- a/lfs_util.h +++ b/lfs_util.h @@ -158,6 +158,7 @@ static inline void *lfs_malloc(size_t size) { #ifndef LFS_NO_MALLOC return malloc(size); #else + (void)size; return NULL; #endif } @@ -166,6 +167,8 @@ static inline void *lfs_malloc(size_t size) { static inline void lfs_free(void *p) { #ifndef LFS_NO_MALLOC free(p); +#else + (void)p; #endif } -- cgit v1.2.3 From 577d777c20095b6030a3e0227d144081d5c4fe5c Mon Sep 17 00:00:00 2001 From: Freddie Chopin Date: Fri, 13 Jul 2018 09:34:49 +0200 Subject: Add C++ guards to public headers Fixes #53 Fixes #32 --- lfs_util.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lfs_util.h') diff --git a/lfs_util.h b/lfs_util.h index d61c545..b2dc237 100644 --- a/lfs_util.h +++ b/lfs_util.h @@ -34,6 +34,11 @@ #include #endif +#ifdef __cplusplus +extern "C" +{ +#endif + // Macros, may be replaced by system specific wrappers. Arguments to these // macros must not have side-effects as the macros can be removed for a smaller @@ -173,5 +178,9 @@ static inline void lfs_free(void *p) { } +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif #endif -- cgit v1.2.3