diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-03-01 17:42:24 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-03-01 17:42:24 +0000 |
commit | ac029a2069b7698efa2545d55bab804aa17cfdac (patch) | |
tree | f8d29fb5efe70504e403aa6129cba3a957d7d24e /nuttx/fs | |
parent | 9bed4ecbfae3b9a399c6e2f4b4da7780d126d38e (diff) | |
download | px4-nuttx-ac029a2069b7698efa2545d55bab804aa17cfdac.tar.gz px4-nuttx-ac029a2069b7698efa2545d55bab804aa17cfdac.tar.bz2 px4-nuttx-ac029a2069b7698efa2545d55bab804aa17cfdac.zip |
Fixes for correct compilation with ZDS-II
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1556 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs')
-rw-r--r-- | nuttx/fs/fat/fs_fat32.c | 10 | ||||
-rw-r--r-- | nuttx/fs/fat/fs_fat32.h | 36 | ||||
-rw-r--r-- | nuttx/fs/fat/fs_fat32util.c | 10 | ||||
-rw-r--r-- | nuttx/fs/fat/fs_writefat.c | 2 | ||||
-rw-r--r-- | nuttx/fs/fs_open.c | 6 |
5 files changed, 37 insertions, 27 deletions
diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c index bd22a61e5..a0a277475 100644 --- a/nuttx/fs/fat/fs_fat32.c +++ b/nuttx/fs/fat/fs_fat32.c @@ -218,7 +218,7 @@ static int fat_open(FAR struct file *filep, const char *relpath, } #ifdef CONFIG_FILE_MODE -# warning "Missing check for privileges based on inode->i_mode" +# warning "Missing check for privileges based on inode->i_mode" #endif /* Check if the caller has sufficient privileges to open the file */ @@ -1672,7 +1672,9 @@ static int fat_unlink(struct inode *mountpt, const char *relpath) * open reference to the file is closed. */ -#warning "Need to defer deleting cluster chain if the file is open" +#ifdef CONFIG_CPP_HAVE_WARNING +# warning "Need to defer deleting cluster chain if the file is open" +#endif /* Remove the file */ @@ -1925,7 +1927,9 @@ int fat_rmdir(struct inode *mountpt, const char *relpath) * open reference to the directory is closed. */ -#warning "Need to defer deleting cluster chain if the directory is open" +#ifdef CONFIG_CPP_HAVE_WARNING +# warning "Need to defer deleting cluster chain if the directory is open" +#endif /* Remove the directory */ diff --git a/nuttx/fs/fat/fs_fat32.h b/nuttx/fs/fat/fs_fat32.h index 89d2c5754..5bced51bc 100644 --- a/nuttx/fs/fat/fs_fat32.h +++ b/nuttx/fs/fat/fs_fat32.h @@ -1,7 +1,7 @@ /**************************************************************************** * fs/fat/fs_fat32.h * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 200, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -319,10 +319,10 @@ #define MBR_PUTVOLID16(p,v) fat_putuint32(UBYTE_PTR(p,BS16_VOLID),v) #define MBR_PUTVOLID32(p,v) fat_putuint32(UBYTE_PTR(p,BS32_VOLID),v) -#define PART1_PUTSTARTSECTOR(p,v) fat_putuint32(UBYTE_PTR(p,PART_ENTRY1+PART_STARTSECTOR,v)) -#define PART1_PUTSIZE(p,v) fat_putuint32(UBYTE_PTR(p,PART_ENTRY1+PART_SIZE,v)) -#define PART2_PUTSTARTSECTOR(p,v) fat_putuint32(UBYTE_PTR(p,PART_ENTRY2+PART_STARTSECTOR,v)) -#define PART2_PUTSIZE(p,v) fat_putuint32(UBYTE_PTR(p,PART_ENTRY2+PART_SIZE,v)) +#define PART1_PUTSTARTSECTOR(p,v) fat_putuint32(UBYTE_PTR(p,PART_ENTRY1+PART_STARTSECTOR),v) +#define PART1_PUTSIZE(p,v) fat_putuint32(UBYTE_PTR(p,PART_ENTRY1+PART_SIZE),v) +#define PART2_PUTSTARTSECTOR(p,v) fat_putuint32(UBYTE_PTR(p,PART_ENTRY2+PART_STARTSECTOR),v) +#define PART2_PUTSIZE(p,v) fat_putuint32(UBYTE_PTR(p,PART_ENTRY2+PART_SIZE),v) /* But for multi-byte values, the endian-ness of the target vs. the little * endian order of the byte stream or alignment of the data within the byte @@ -373,19 +373,19 @@ # define FAT_GETFAT16(p,i) fat_getuint16(UBYTE_PTR(p,i)) # define FAT_GETFAT32(p,i) fat_getuint32(UBYTE_PTR(p,i)) -# define MBR_PUTRESVDSECCOUNT(p,v) fat_putuint16(UBYTE_PTR(p,BS_RESVDSECCOUNT,v)) -# define MBR_PUTFATSZ16(p,v) fat_putuint16(UBYTE_PTR(p,BS_FATSZ16,v)) -# define MBR_PUTSECPERTRK(p,v) fat_putuint16(UBYTE_PTR(p,BS_SECPERTRK,v)) -# define MBR_PUTNUMHEADS(p,v) fat_putuint16(UBYTE_PTR(p,BS_NUMHEADS,v)) -# define MBR_PUTHIDSEC(p,v) fat_putuint32(UBYTE_PTR(p,BS_HIDSEC,v)) -# define MBR_PUTTOTSEC32(p,v) fat_putuint32(UBYTE_PTR(p,BS_TOTSEC32,v)) -# define MBR_PUTFATSZ32(p,v) fat_putuint32(UBYTE_PTR(p,BS32_FATSZ32,v)) -# define MBR_PUTEXTFLAGS(p,v) fat_putuint16(UBYTE_PTR(p,BS32_EXTFLAGS,v)) -# define MBR_PUTFSVER(p,v) fat_putuint16(UBYTE_PTR(p,BS32_FSVER,v)) -# define MBR_PUTROOTCLUS(p,v) fat_putuint32(UBYTE_PTR(p,BS32_ROOTCLUS,v)) -# define MBR_PUTFSINFO(p,v) fat_putuint16(UBYTE_PTR(p,BS32_FSINFO,v)) -# define MBR_PUTBKBOOTSEC(p,v) fat_putuint16(UBYTE_PTR(p,BS32_BKBOOTSEC,v)) -# define MBR_PUTSIGNATURE(p,v) fat_getuint16(UBYTE_PTR(p,BS_SIGNATURE),v) +# define MBR_PUTRESVDSECCOUNT(p,v) fat_putuint16(UBYTE_PTR(p,BS_RESVDSECCOUNT),v) +# define MBR_PUTFATSZ16(p,v) fat_putuint16(UBYTE_PTR(p,BS_FATSZ16),v) +# define MBR_PUTSECPERTRK(p,v) fat_putuint16(UBYTE_PTR(p,BS_SECPERTRK),v) +# define MBR_PUTNUMHEADS(p,v) fat_putuint16(UBYTE_PTR(p,BS_NUMHEADS),v) +# define MBR_PUTHIDSEC(p,v) fat_putuint32(UBYTE_PTR(p,BS_HIDSEC),v) +# define MBR_PUTTOTSEC32(p,v) fat_putuint32(UBYTE_PTR(p,BS_TOTSEC32),v) +# define MBR_PUTFATSZ32(p,v) fat_putuint32(UBYTE_PTR(p,BS32_FATSZ32),v) +# define MBR_PUTEXTFLAGS(p,v) fat_putuint16(UBYTE_PTR(p,BS32_EXTFLAGS),v) +# define MBR_PUTFSVER(p,v) fat_putuint16(UBYTE_PTR(p,BS32_FSVER),v) +# define MBR_PUTROOTCLUS(p,v) fat_putuint32(UBYTE_PTR(p,BS32_ROOTCLUS),v) +# define MBR_PUTFSINFO(p,v) fat_putuint16(UBYTE_PTR(p,BS32_FSINFO),v) +# define MBR_PUTBKBOOTSEC(p,v) fat_putuint16(UBYTE_PTR(p,BS32_BKBOOTSEC),v) +# define MBR_PUTSIGNATURE(p,v) fat_putuint16(UBYTE_PTR(p,BS_SIGNATURE),v) # define FSI_PUTLEADSIG(p,v) fat_putuint32(UBYTE_PTR(p,FSI_LEADSIG),v) # define FSI_PUTSTRUCTSIG(p,v) fat_putuint32(UBYTE_PTR(p,FSI_STRUCTSIG),v) diff --git a/nuttx/fs/fat/fs_fat32util.c b/nuttx/fs/fat/fs_fat32util.c index dc1404f9e..16f47727b 100644 --- a/nuttx/fs/fat/fs_fat32util.c +++ b/nuttx/fs/fat/fs_fat32util.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs_fat32util.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * References: @@ -549,7 +549,9 @@ void fat_semgive(struct fat_mountpt_s *fs) uint32 fat_systime2fattime(void) { -#warning "Time not implemented" +#ifdef CONFIG_CPP_HAVE_WARNING +# warning "Time not implemented" +#endif return 0; } @@ -571,7 +573,9 @@ uint32 fat_systime2fattime(void) time_t fat_fattime2systime(uint16 fattime, uint16 fatdate) { -#warning "Time not implemented" +#ifdef CONFIG_CPP_HAVE_WARNING +# warning "Time not implemented" +#endif return 0; } diff --git a/nuttx/fs/fat/fs_writefat.c b/nuttx/fs/fat/fs_writefat.c index 0cffac044..401d023ba 100644 --- a/nuttx/fs/fat/fs_writefat.c +++ b/nuttx/fs/fat/fs_writefat.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/fat/fs_writefat.c * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without diff --git a/nuttx/fs/fs_open.c b/nuttx/fs/fs_open.c index 166471bfb..8ab650376 100644 --- a/nuttx/fs/fs_open.c +++ b/nuttx/fs/fs_open.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs_open.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -90,7 +90,9 @@ int open(const char *path, int oflags, ...) } #ifdef CONFIG_FILE_MODE -# warning "File creation not implemented" +# ifdef CONFIG_CPP_HAVE_WARNING +# warning "File creation not implemented" +# endif /* If the file is opened for creation, then get the mode bits */ |