Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign comparison warnings when compiling the NI-845x #216

Open
martonmiklos opened this issue Jul 27, 2021 · 0 comments
Open

Sign comparison warnings when compiling the NI-845x #216

martonmiklos opened this issue Jul 27, 2021 · 0 comments

Comments

@martonmiklos
Copy link
Contributor

Issue for myself to fix sometime:

Recently did a build with Mingw and failed unless passing WARNERROR=no to make

ni845x_spi.c: In function 'ni845x_spi_open':
ni845x_spi.c:188:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (!serial || strtol(serial, NULL, 16) == serial_as_number)
                                           ^~
ni845x_spi.c: In function 'usb8452_spi_set_io_voltage':
ni845x_spi.c:271:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (i = 0; i < ARRAY_SIZE(usb8452_io_voltages_in_100mV); i++) {
                 ^
ni845x_spi.c: At top level:
ni845x_spi.c:534:13: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
  .command = ni845x_spi_transmit,
             ^~~~~~~~~~~~~~~~~~~
ni845x_spi.c:534:13: note: (near initialization for 'spi_programmer_ni845x.command')
ni845x_spi.c: In function 'ni845x_spi_init':
ni845x_spi.c:559:39: warning: comparison is always false due to limited range of data type [-Wtype-limits]
   if (strlen(CS_str) > 1 || CS_number < 0 || 7 < CS_number) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant