Refs #523, #529. Added bash-script for updating the pc-lint configuration files for the installed GCC version. Replaced deprecated libusb_set_debug() with libusb_set_option() for newer versions of Libusb.

git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@480 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
Frank Voorburg 2018-04-23 10:28:51 +00:00
parent 9a3b6c91e1
commit e4acfbce62
4 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
#
# Bash script to update the lint configuration files for the installed version of GCC.
#
# Create temporary empty source-file
touch empty.c
# Generate header file with preprocessor configuration macros to use by lint.
gcc -E -dM empty.c >lint_cmac.h
# Generate lint configuration file with compiler include paths.
gcc -c -v empty.c 2>&1 | awk '/#include <...> search starts here:/{flag=1;next}/End of search list./{flag=0}flag' > gcc-include-path.lnt
sed -i 's# /#--i/#g' gcc-include-path.lnt
# Remove temporary empty source-file
rm -f empty.c
rm -f empty.o

View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
#
# Bash script to update the lint configuration files for the installed version of GCC.
#
# Create temporary empty source-file
touch empty.c
# Generate header file with preprocessor configuration macros to use by lint.
gcc -E -dM empty.c >lint_cmac.h
# Generate lint configuration file with compiler include paths.
gcc -c -v empty.c 2>&1 | awk '/#include <...> search starts here:/{flag=1;next}/End of search list./{flag=0}flag' > gcc-include-path.lnt
sed -i 's# /#--i/#g' gcc-include-path.lnt
# Remove temporary empty source-file
rm -f empty.c
rm -f empty.o

View File

@ -104,7 +104,11 @@ void UsbBulkInit(void)
if (libUsbCtx != NULL)
{
/* Set the log message verbosity as advised by the documentation. */
#if LIBUSB_API_VERSION >= 0x01000106
(void)libusb_set_option(libUsbCtx, LIBUSB_OPTION_LOG_LEVEL, (int)LIBUSB_LOG_LEVEL_WARNING);
#else
libusb_set_debug(libUsbCtx, (int)LIBUSB_LOG_LEVEL_WARNING);
#endif
}
} /*** end of UsbBulkInit ***/

View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
#
# Bash script to update the lint configuration files for the installed version of GCC.
#
# Create temporary empty source-file
touch empty.c
# Generate header file with preprocessor configuration macros to use by lint.
gcc -E -dM empty.c >lint_cmac.h
# Generate lint configuration file with compiler include paths.
gcc -c -v empty.c 2>&1 | awk '/#include <...> search starts here:/{flag=1;next}/End of search list./{flag=0}flag' > gcc-include-path.lnt
sed -i 's# /#--i/#g' gcc-include-path.lnt
# Remove temporary empty source-file
rm -f empty.c
rm -f empty.o