[U-Boot] [PATCH] YAFFS2: Fix compiler errors preventing successful build
Marek Vasut
marex at denx.de
Tue Aug 14 22:16:22 CEST 2012
These warnings still persist:
yaffs_guts.c: In function ‘yaffs_check_chunk_erased’:
yaffs_guts.c:324:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
yaffs_guts.c: In function ‘yaffs_verify_chunk_written’:
yaffs_guts.c:352:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
yaffs_guts.c: In function ‘yaffs_grab_chunk_cache’:
yaffs_guts.c:1488:6: warning: variable ‘pushout’ set but not used [-Wunused-but-set-variable]
yaffs_guts.c: In function ‘yaffs_check_obj_details_loaded’:
yaffs_guts.c:3180:6: warning: variable ‘alloc_failed’ set but not used [-Wunused-but-set-variable]
yaffs_guts.c:3179:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
yaffs_guts.c: In function ‘yaffs_update_oh’:
yaffs_guts.c:3288:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
yaffs_guts.c: In function ‘yaffs_get_obj_name’:
yaffs_guts.c:4447:7: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
yaffs_summary.c: In function ‘yaffs_summary_read’:
yaffs_summary.c:194:6: warning: variable ‘sum_tags_bytes’ set but not used [-Wunused-but-set-variable]
yaffs_verify.c: In function ‘yaffs_verify_file’:
yaffs_verify.c:227:6: warning: variable ‘actual_depth’ set but not used [-Wunused-but-set-variable]
yaffs_yaffs1.c: In function ‘yaffs1_scan’:
yaffs_yaffs1.c:26:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
yaffs_yaffs2.c: In function ‘yaffs2_scan_chunk’:
yaffs_yaffs2.c:949:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
yaffs_yaffs2.c: In function ‘yaffs2_scan_backwards’:
yaffs_yaffs2.c:1352:6: warning: variable ‘deleted’ set but not used [-Wunused-but-set-variable]
yaffs_mtdif2.c: In function ‘nandmtd2_write_chunk_tags’:
yaffs_mtdif2.c:51:5: warning: unused variable ‘local_spare’ [-Wunused-variable]
Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Charles Manning <cdhmanning at gmail.com>
Cc: Wolfgang Denk <wd at denx.de>
---
fs/yaffs2/ydirectenv.h | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/fs/yaffs2/ydirectenv.h b/fs/yaffs2/ydirectenv.h
index df0b8fb..85538ad 100644
--- a/fs/yaffs2/ydirectenv.h
+++ b/fs/yaffs2/ydirectenv.h
@@ -26,10 +26,12 @@
#include "yaffs_osglue.h"
#include "yaffs_hweight.h"
-void yaffs_bug_fn(const char *file_name, int line_no);
+#include <malloc.h>
+#include <linux/compat.h>
-#define BUG() do { yaffs_bug_fn(__FILE__, __LINE__); } while (0)
+void yaffs_bug_fn(const char *file_name, int line_no);
+#define GFP_NOFS 1
#define YCHAR char
#define YUCHAR unsigned char
@@ -47,8 +49,6 @@ void yaffs_bug_fn(const char *file_name, int line_no);
#define yaffs_strncmp(a, b, c) strncmp(a, b, c)
#endif
-#define hweight8(x) yaffs_hweight8(x)
-#define hweight32(x) yaffs_hweight32(x)
void yaffs_qsort(void *aa, size_t n, size_t es,
int (*cmp)(const void *, const void *));
@@ -63,11 +63,6 @@ void yaffs_qsort(void *aa, size_t n, size_t es,
#define inline __inline__
#endif
-#define kmalloc(x, flags) yaffsfs_malloc(x)
-#define kfree(x) yaffsfs_free(x)
-#define vmalloc(x) yaffsfs_malloc(x)
-#define vfree(x) yaffsfs_free(x)
-
#define cond_resched() do {} while (0)
#define yaffs_trace(msk, fmt, ...) do { \
--
1.7.10.4
More information about the U-Boot
mailing list