Patchwork block: Fix compilation with DEBUG defined

login
register
mail settings
Submitter Riccardo Magliocchetti
Date May 19, 2010, 8:53 p.m.
Message ID <1274302424-9973-1-git-send-email-riccardo.magliocchetti@gmail.com>
Download mbox | patch
Permalink /patch/53023/
State New
Headers show

Comments

Riccardo Magliocchetti - May 19, 2010, 8:53 p.m.
gcc does not like passing a NULL where an int value is expected:

block/vvfat.c: In function ‘checkpoint’:
block/vvfat.c:2868: error: passing argument 2 of ‘remove_mapping’ makes
  integer from pointer without a cast

Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
---
 block/vvfat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Kevin Wolf - May 20, 2010, 8:43 a.m.
Am 19.05.2010 22:53, schrieb Riccardo Magliocchetti:
> gcc does not like passing a NULL where an int value is expected:
> 
> block/vvfat.c: In function ‘checkpoint’:
> block/vvfat.c:2868: error: passing argument 2 of ‘remove_mapping’ makes
>   integer from pointer without a cast
> 
> Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

Thanks, applied to the block branch.

You're probably using a 32 bit platform? I needed another fix to get it
compiling on x86_64, which I just sent to the list.

Kevin
Riccardo Magliocchetti - May 20, 2010, 9:02 a.m.
Il 20/05/2010 10:43, Kevin Wolf ha scritto:
> Am 19.05.2010 22:53, schrieb Riccardo Magliocchetti:
>> gcc does not like passing a NULL where an int value is expected:
>>
>> block/vvfat.c: In function ‘checkpoint’:
>> block/vvfat.c:2868: error: passing argument 2 of ‘remove_mapping’ makes
>>    integer from pointer without a cast
>>
>> Signed-off-by: Riccardo Magliocchetti<riccardo.magliocchetti@gmail.com>
>
> Thanks, applied to the block branch.
>
> You're probably using a 32 bit platform? I needed another fix to get it
> compiling on x86_64, which I just sent to the list.

Thanks, yes i'm on 32bit.

riccardo

Patch

diff --git a/block/vvfat.c b/block/vvfat.c
index ce16bbd..13c31fa 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -2865,7 +2865,7 @@  static void checkpoint(void) {
     return;
     /* avoid compiler warnings: */
     hexdump(NULL, 100);
-    remove_mapping(vvv, NULL);
+    remove_mapping(vvv, 0);
     print_mapping(NULL);
     print_direntry(NULL);
 }