jackaudio / jack1

jack1 codebase
Other
250 stars 70 forks source link

Please fix clang compiler warnings #59

Open yurivict opened 7 years ago

yurivict commented 7 years ago

Clang prints these warnings:

netjack.c:410:86: warning: incompatible pointer to integer conversion passing 'CELTMode *' (aka 'struct CELTMode *') to parameter of type 'int' [-Wint-conversion]
            netj->capture_srcs = jack_slist_append(netj->capture_srcs, celt_decoder_create( netj->celt_mode, 1, NULL ) );
                                                                                            ^~~~~~~~~~~~~~~
/usr/local/include/celt/celt.h:264:45: note: passing argument to parameter 'sampling_rate' here
EXPORT CELTDecoder *celt_decoder_create(int sampling_rate, int channels, int *error);
                                            ^
netjack.c:457:88: warning: incompatible pointer to integer conversion passing 'CELTMode *' (aka 'struct CELTMode *') to parameter of type 'int' [-Wint-conversion]
            netj->playback_srcs = jack_slist_append(netj->playback_srcs, celt_encoder_create( celt_mode, 1, NULL ) );
                                                                                              ^~~~~~~~~
/usr/local/include/celt/celt.h:184:45: note: passing argument to parameter 'sampling_rate' here
EXPORT CELTEncoder *celt_encoder_create(int sampling_rate, int channels, int *error);
                                            ^
server_control.c:57:1: warning: unused function 'jackctl_get_parameter' [-Wunused-function]
jackctl_get_parameter(
^
ipunload.c:53:65: warning: variable 'intclient' is uninitialized when used here [-Wuninitialized]
        if (jack_internal_client_handle (client, client_name, &status, intclient) != 0) {
                                                                       ^~~~~~~~~
ipunload.c:14:28: note: initialize the variable 'intclient' to silence this warning
        jack_intclient_t intclient;
                                  ^
                                   = 0
property.c:271:78: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                        if ((cnt = jack_get_properties (uuid, &description)) < 0) {
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
property.c:301:76: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                        if ((cnt = jack_get_all_properties (&description)) < 0) {
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
tw.c:63:20: warning: 'jack_thread_wait' is deprecated [-Wdeprecated-declarations]
        while ((nframes = jack_thread_wait (client, _process (nframes))) != 0);
                          ^
../jack/jack.h:223:16: note: 'jack_thread_wait' has been explicitly marked deprecated here
jack_nframes_t jack_thread_wait (jack_client_t*, int status) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
               ^