Is this an error?

Tony van der Hoff OSLib at mk-net.demon.co.uk
Mon May 22 19:17:31 BST 2000


Please tell me I'm wrong on this:

In core.adfs.swi we have:

SWI ADFSDiscOp_ReadSectorsViaCache = (NUMBER 0x40240,
      ENTRY (R1 # 9 "Reads sectors of a disc using the RMA cache", R1 |
.Bits: flags,
            R2 = FileCore_DiscAddress: disc_addr, R3 = .Ref .Data: data,
            R4 = .Int: size, R6 = .Int: cache_handle),
      EXIT (R2 = FileCore_DiscAddress: next_disc_addr,
            R3 = .Ref .Data: next_data,
            R4! = .Int: unread, R6 = .Int: cache_handle));

Which is translated into:

extern os_error *xadfsdiscop_read_sectors_via_cache (bits flags,
      filecore_disc_address disc_addr,
      byte *data,
      int size,
      int cache_handle,
      filecore_disc_address *next_disc_addr,
      byte **next_data,
      int *unread,
      int *cache_handle);


Now, it appears that cache_handle is both an int and an int*, which I
don't think is quite right. 

A nasty twist to this is that Norcroft doesn't fault it on compiling
test.c, but GCC does. 

Am I going mad, or is this a bug? I count 14 further instances of reuse
of parameter names in function definitions in various parts of the
library.

Tony

-- 
Tony van der Hoff         |  Mailto:tony at mk-net.demon.co.uk
                          |  Mailto:avanderhoff at iee.org
Buckinghamshire, England  |  http:www.mk-net.demon.co.uk



More information about the oslib-team mailing list