Commit graph

30 commits

Author SHA1 Message Date
Jeff Epler
48a8ca2ae6 Fix unused-parameter diagnostics
.. mostly by hinting to the compiler that they are intended to be
unused.
2021-05-04 09:02:47 -05:00
Jeff Epler
9fcd70351c Check all I/O calls 2021-05-04 09:02:47 -05:00
Damian Wrobel
63e8e8f64b Fix -Wstringop-truncation warnings
Fixes the following warnings:
In function 'strncpy',
    inlined from 'spi_boards_scan' at spi_boards.c:203:9:
/usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy'
output truncated before terminating nul copying 4 bytes
from a string of the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));

In file included from /usr/include/string.h:495,
                 from pci_boards.c:34:
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:1281:21:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:1240:21:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:1205:21:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:1177:21:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:1144:21:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:1117:21:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:1089:21:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:1056:21:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:1026:21:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:995:17:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:967:17:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:940:17:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:912:17:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:885:17:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘pci_boards_scan’ at pci_boards.c:851:17:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 14 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /usr/include/string.h:495,
                 from usb_boards.c:21:
In function ‘strncpy’,
    inlined from ‘usb_boards_scan’ at usb_boards.c:188:9:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘usb_boards_scan’ at usb_boards.c:147:13:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’
output truncated before terminating nul copying 4 bytes from a string of
the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In function ‘strncpy’,
    inlined from ‘eth_scan_one_addr’ at eth_boards.c:329:13,
    inlined from ‘eth_scan_one_addr.isra.0’ at eth_boards.c:136:12:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output
may be truncated copying 16 bytes from a string of length 19 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘eth_scan_one_addr’ at eth_boards.c:306:13,
    inlined from ‘eth_scan_one_addr.isra.0’ at eth_boards.c:136:12:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output
may be truncated copying 16 bytes from a string of length 19 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘eth_scan_one_addr’ at eth_boards.c:283:13,
    inlined from ‘eth_scan_one_addr.isra.0’ at eth_boards.c:136:12:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output
may be truncated copying 16 bytes from a string of length 19 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘eth_scan_one_addr’ at eth_boards.c:259:13,
    inlined from ‘eth_scan_one_addr.isra.0’ at eth_boards.c:136:12:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output
may be truncated copying 16 bytes from a string of length 19 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘eth_scan_one_addr’ at eth_boards.c:235:13,
    inlined from ‘eth_scan_one_addr.isra.0’ at eth_boards.c:136:12:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output
may be truncated copying 16 bytes from a string of length 19 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘eth_scan_one_addr’ at eth_boards.c:211:13,
    inlined from ‘eth_scan_one_addr.isra.0’ at eth_boards.c:136:12:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output
may be truncated copying 16 bytes from a string of length 19 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘eth_scan_one_addr’ at eth_boards.c:186:13,
    inlined from ‘eth_scan_one_addr.isra.0’ at eth_boards.c:136:12:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output
may be truncated copying 16 bytes from a string of length 19 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘eth_scan_one_addr’ at eth_boards.c:161:13,
    inlined from ‘eth_scan_one_addr.isra.0’ at eth_boards.c:136:12:
/usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output
may be truncated copying 16 bytes from a string of length 19 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2020-04-20 16:35:34 +02:00
Jeff Epler
cab439923a Remove declarations of unused variables
All these produced a diagnostic when -Wunused-variables was specified.
2016-07-02 08:47:37 -05:00
Michael Geszkiewicz
3106d0df2b anyio: refactor: unification of functions arguments in hostmot2 access interface
factor out common board structure initialisations to function

Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2015-03-09 01:01:03 +01:00
Michael Geszkiewicz
560680d366 libanyio: print bit file details only in verbose mode
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-11 23:01:15 +02:00
Michael Geszkiewicz
c431de4ff9 libanyio: introduce types.h to hold global types definitions
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-09-07 23:00:03 +02:00
Michael Geszkiewicz
67d724d7c6 remove various casting and syntax warnings
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-05-09 23:55:24 +02:00
Michael Geszkiewicz
bf2de2cc6d refactor: extract board definitions to boards.h to remove including main library header file in all submodules
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-05-09 13:35:23 +02:00
Michael Geszkiewicz
6dac0e0747 Add GPL licence in all source files
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-02-24 04:37:08 +01:00
Michael Geszkiewicz
e225cfe89d refactor: move few library function from lib api to device struture api
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-02-23 18:40:12 +01:00
Michael Geszkiewicz
ead494d7e1 refactor spi access code
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-02-05 21:00:19 +01:00
Michael Geszkiewicz
fcffd8617f Add library cleanup at exit
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2014-01-30 03:40:58 +01:00
Michael Geszkiewicz
ccfc274b86 usb: add support for reading and writing hm2 area
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-11-13 02:09:29 +01:00
Michael Geszkiewicz
e6d3929e3d usb: add support for 7i43 board with FPGA programmed
slight identation fix

Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-11-13 00:06:40 +01:00
Michael Geszkiewicz
1f2c432c45 usb: fix reading hostmot2 data via usb
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-11-12 05:57:14 +01:00
micges
6ffbc60213 usb: added programming 7i43 FPGA 2013-11-11 02:37:45 +01:00
micges
893dab3e26 add basic support for detecting 7i43 in usb mode 2013-11-11 01:58:22 +01:00
micges
966082ec49 usb: windows port of 7i64 usb mode support 2013-11-11 00:40:54 +01:00
Michael Geszkiewicz
67e323ed63 add support for 7i64 board in usb mode
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-11-10 21:03:39 +01:00
Michael Geszkiewicz
f5b3343d8f usb: add support for lbp protocol, check lbp cookie with new api
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-11-10 01:29:24 +01:00
Michael Geszkiewicz
ef8256a25e add error handling during initialisations of transport modules
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-11-07 22:15:29 +01:00
Michael Geszkiewicz
8b93fe9e35 add basic command line options
use verbose flag to check if detail information should be printed while scanning pci devices

Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-11-01 00:57:32 +01:00
Michael Geszkiewicz
77144d4040 Zmana nazwy modułów
przygotowanie do wydzielenia biblioteki ANYIO z programu

Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-10-14 02:32:53 +02:00
Michael Geszkiewicz
379514c877 usunięcie nieużywanego nagłowka
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-10-14 02:20:52 +02:00
Michael Geszkiewicz
abe81793c6 wspólna funkcja wyświetlająca podstawowe informacje o urządzeniach
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-10-14 02:17:55 +02:00
Michael Geszkiewicz
20d77b7209 Jeden typ urządzenia obejmujący 4 kategorie pci usb lpt eth
jedna globalna list urządzeń
jeden interfejs dostępu do skanowania urządzeń

Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-10-14 02:02:35 +02:00
micges
6e8a7bf2e1 Częściowy port aplikacji na windows (kompiluje się) 2013-10-12 05:38:20 +02:00
Michael Geszkiewicz
671fb2c17e refaktor: zmiana nazw plików systemu dostępu do pamięci flash odpowiadająca rzeczywistości
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-10-09 05:16:27 +02:00
Michael Geszkiewicz
1a6131e1c3 Dodanie szkieletu obsługi kart USB - WIP
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2013-10-09 03:46:42 +02:00