analogdevicesinc / iio-emu

Server application for libiio clients.
Other
8 stars 6 forks source link

tools/genxml: fix -Wincompatible-pointer-types #14

Closed dlech closed 11 months ago

dlech commented 11 months ago

This fixes the following warnings:

/home/ubuntu/bl/iio-emu/tools/genxml.c: In function ‘iio_context_create_xml’:
/home/ubuntu/bl/iio-emu/tools/genxml.c:585:46: warning: passing argument 3 of ‘iio_context_get_attr’ from incompatible pointer type [-Wincompatible-pointer-types]
585 |                 iio_context_get_attr(ctx, i, &ctx_attr, &ctx_value);
    |                                              ^~~~~~~~~
    |                                              |
    |                                              char **
In file included from /home/ubuntu/bl/iio-emu/tools/genxml.c:20:
/usr/include/iio.h:501:30: note: expected ‘const char **’ but argument is of type ‘char **’
501 |                 const char **name, const char **value);
    |                 ~~~~~~~~~~~~~^~~~
/home/ubuntu/bl/iio-emu/tools/genxml.c:585:57: warning: passing argument 4 of ‘iio_context_get_attr’ from incompatible pointer type [-Wincompatible-pointer-types]
585 |                 iio_context_get_attr(ctx, i, &ctx_attr, &ctx_value);
    |                                                         ^~~~~~~~~~
    |                                                         |
    |                                                         char **
In file included from /home/ubuntu/bl/iio-emu/tools/genxml.c:20:
/usr/include/iio.h:501:49: note: expected ‘const char **’ but argument is of type ‘char **’
501 |                 const char **name, const char **value);
    |                                    ~~~~~~~~~~~~~^~~~~