Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2018-08-05 04:33:09 +0300
committerChristopher Haster <chaster@utexas.edu>2018-10-16 19:33:00 +0300
commit6d0a6fc4622d0a48ab790d2b430048c8b32c606c (patch)
tree41fe9e997a7e186253041de68e18ff5092b8b227 /lfs_util.h
parent3186e89b14acdbd162911bc6af89ab94489a2a0a (diff)
parent510cd13df99843174899aa3ddabcbc889c7872e8 (diff)
Merge remote-tracking branch 'origin/master' into v2-alpha
Diffstat (limited to 'lfs_util.h')
-rw-r--r--lfs_util.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/lfs_util.h b/lfs_util.h
index 6dd28da..ed55a1c 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
@@ -34,6 +23,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
+#include <inttypes.h>
#ifndef LFS_NO_MALLOC
#include <stdlib.h>
@@ -45,6 +35,11 @@
#include <stdio.h>
#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
@@ -199,6 +194,7 @@ static inline void *lfs_malloc(size_t size) {
#ifndef LFS_NO_MALLOC
return malloc(size);
#else
+ (void)size;
return NULL;
#endif
}
@@ -207,9 +203,15 @@ 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
}
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif
#endif