NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/39215: getdevmajor()/major() types don't match

On Aug 4, 11:05pm, (Matthias Drochner) wrote:
-- Subject: Re: lib/39215: getdevmajor()/major() types don't match

| This is a multipart MIME message.
| --==_Exmh_10139695340550
| Content-Type: text/plain; charset=us-ascii
| said:
| > That's all not too serious, but it is more work than one would
| > initially expect. I'll try to come up with patches. 
| OK, here is it. I've just set devmajor/minor_t to "long"
| to get compiler warnings. It should stay where it was,
| at int32_t, for now. (Actually, I don't see a good reason to
| use a fixed-size type here, it is all inside the API afaics.)
| So the typecasts for printf which make out most of the patch
| are not necessary, but they show what happens if one really
| wants to use 64 bit for majors or so.

I think PRI macros should be used otherwise if you use casts, this
will silence the truncation to int for long for example.


Home | Main Index | Thread Index | Old Index