2003-03-18 14:40:10

by Geert Uytterhoeven

[permalink] [raw]
Subject: NTFS byte swapping


When compiling NTFS support in 2.5.65 on a big-endian machine (m68k), I get:

| fs/ntfs/compress.c:167: warning: passing arg 1 of `__swab16p' from incompatible pointer type
| fs/ntfs/compress.c:207: warning: passing arg 1 of `__swab16p' from incompatible pointer type
| fs/ntfs/compress.c:228: warning: passing arg 1 of `__swab16p' from incompatible pointer type
| fs/ntfs/compress.c:333: warning: passing arg 1 of `__swab16p' from incompatible pointer type

The offending code does `le16_to_cpup(cb)', with cb a pointer to a u8.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


2003-03-18 16:30:25

by Anton Altaparmakov

[permalink] [raw]
Subject: Re: NTFS byte swapping

Hi,

On Tue, 18 Mar 2003, Geert Uytterhoeven wrote:
> When compiling NTFS support in 2.5.65 on a big-endian machine (m68k), I get:
>
> | fs/ntfs/compress.c:167: warning: passing arg 1 of `__swab16p' from incompatible pointer type
> | fs/ntfs/compress.c:207: warning: passing arg 1 of `__swab16p' from incompatible pointer type
> | fs/ntfs/compress.c:228: warning: passing arg 1 of `__swab16p' from incompatible pointer type
> | fs/ntfs/compress.c:333: warning: passing arg 1 of `__swab16p' from incompatible pointer type
>
> The offending code does `le16_to_cpup(cb)', with cb a pointer to a u8.

Thanks for letting us know. I have fixed it now (just doing
le16to_cpup((u16*)cb) instead which should fix the warnings. I will submit
to Linus together with other changes later.

Best regards,

Anton
--
Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/