[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
in arguments of MiG routines must be declared as `const'
From: |
Ognyan Kulev |
Subject: |
in arguments of MiG routines must be declared as `const' |
Date: |
Wed, 22 May 2002 16:06:43 +0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc2) Gecko/20020515 Debian/1.0rc2-2 |
Hi,
Take a look at libstore/file.c:file_write. We have
static error_t
file_write (struct store *store,
store_offset_t addr, size_t index, const void *buf,
size_t len, size_t *amount)
{
size_t bsize = store->block_size;
return io_write (store->port, buf, len, addr * bsize, amount);
}
but the second argument of MiG prototyped io_write is not const and gcc
prints warning.
There are 24 warning of this type but forget them: more importantly the
correct way to prototype [in] arguments in MiG is they to be const when
they are arrays. This would require changing the MiG generator, and
many definitions in Hurd servers and libraries. Quite a mass change.
I would like to do this. Is it correct that the MiG generator and *_S_*
definitions are the only places to be touched?
Regards
--
Ognyan Kulev <ogi@fmi.uni-sofia.bg>, "\"Programmer\""
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- in arguments of MiG routines must be declared as `const',
Ognyan Kulev <=