summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-13 15:13:37 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-13 15:13:37 +0000
commitc37fdc28c2cfdf41a549ba245c1cad85b757e53a (patch)
tree2812daa6196bae9eb0a4233aa1b28f6eb7902c44 /nuttx/fs
parenta3933a716fd10ac4c87089ce7fac43ee24b3a2d4 (diff)
downloadpx4-nuttx-c37fdc28c2cfdf41a549ba245c1cad85b757e53a.tar.gz
px4-nuttx-c37fdc28c2cfdf41a549ba245c1cad85b757e53a.tar.bz2
px4-nuttx-c37fdc28c2cfdf41a549ba245c1cad85b757e53a.zip
Eliminate some hcs12 compile errors/warnings
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2329 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/fs_mmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nuttx/fs/fs_mmap.c b/nuttx/fs/fs_mmap.c
index 309d48942..0fa0b56e1 100644
--- a/nuttx/fs/fs_mmap.c
+++ b/nuttx/fs/fs_mmap.c
@@ -146,10 +146,12 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags,
* only option supported
*
* Perform the ioctl to get the base address of the file in 'mapped'
- * in memory.
+ * in memory. (casting to uintptr first eliminates complaints on some
+ * architectures where the sizeof long is different from the size of
+ * a pointer).
*/
- ret = ioctl(fd, FIOC_MMAP, (unsigned long)&addr);
+ ret = ioctl(fd, FIOC_MMAP, (unsigned long)((uintptr)&addr));
if (ret < 0)
{
fdbg("ioctl(FIOC_MMAP) failed: %d\n", errno);