[patch] fix K&R int promotion warnings in sys/compat/ndis/subr_usbd.c



Hi,

Here is a patch to fix the K&R function declaration to match the ANSI
prototypes, done so by ANSIfying the rest of the K&R function
declarations in the file.

http://lev.vlakno.cz/~pwo/warn-fix/ndis-subr_usbd.diff

Sample warning:
/usr/src/sys/modules/ndis/../../compat/ndis/subr_usbd.c:598:13:
warning: promoted type 'int' of K&R function parameter is not
compatible with the parameter type 'uint8_t' (aka 'unsigned char')
declared in a previous prototype
uint8_t ifidx;
^
/usr/src/sys/modules/ndis/../../compat/ndis/subr_usbd.c:120:59: note:
previous declaration is here
static usb_error_t usbd_setup_endpoint_one(irp *, uint8_t,
^

--
Pawel
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: How to convert Infix notation to postfix notation
    ... (READER NOTE: There is actual content about C in this one, ... is a definition, the one without a function body is a declaration, also ... Because prototypes would be needed anyway. ... pieces of code for which you have *no source code*. ...
    (comp.lang.c)
  • Re: How to convert Infix notation to postfix notation
    ... is a definition, the one without a function body is a declaration, also ... There's no real need these days for function prototypes, for functions which are defined in the same file at least. ... plus for vendors targeting smaller systems. ... How many development computers these days are only capable of running a single-pass compiler? ...
    (comp.lang.c)
  • Re: How to convert Infix notation to postfix notation
    ... is a definition, the one without a function body is a declaration, also ... You also don't understand the intent or purpose of the feature. ... Prototypes are primarily used to address the fairly common case where the ... You need to actually learn a radically different programming language. ...
    (comp.lang.c)
  • Re: Is this necessary?
    ... These are called function prototypes, which are a kind of declaration ... In versions of C prior to the 1999 language standard update, ... which was that it must have a return type of int. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: hash table
    ... so lack of prototypes requires diagnostics. ... it is the lack of a declaration that requires ... If you study the Standard, you will find that every function ... Reading email is like searching for food in the garbage, ...
    (comp.lang.c)