Всем привет!
Сабж от тула такого
CODE
~/tools/gcc-arm-none-eabi-4_8-2013q4/bin$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/bin/../lib/gcc/arm-none-eabi/4.8.3/lto-wrapper
Target: arm-none-eabi
Configured with: /home/build/work/GCC-4-8-build/src/gcc/configure --target=arm-none-eabi --prefix=/home/build/work/GCC-4-8-build/install-native
--libexecdir=/home/build/work/GCC-4-8-build/install-native/lib --infodir=/home/build/work/GCC-4-8-build/install-native/share/doc/gcc-arm-none-eabi/info
--mandir=/home/build/work/GCC-4-8-build/install-native/share/doc/gcc-arm-none-eabi/man
--htmldir=/home/build/work/GCC-4-8-build/install-native/share/doc/gcc-arm-none-eabi/html
--pdfdir=/home/build/work/GCC-4-8-build/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float
--disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads
--disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi
--with-sysroot=/home/build/work/GCC-4-8-build/install-native/arm-none-eabi --build=i686-linux-gnu --host=i686-linux-gnu
--with-gmp=/home/build/work/GCC-4-8-build/build-native/host-libs/usr --with-mpfr=/home/build/work/GCC-4-8-build/build-native/host-libs/usr
--with-mpc=/home/build/work/GCC-4-8-build/build-native/host-libs/usr --with-isl=/home/build/work/GCC-4-8-build/build-native/host-libs/usr
--with-cloog=/home/build/work/GCC-4-8-build/build-native/host-libs/usr --with-libelf=/home/build/work/GCC-4-8-build/build-native/host-libs/usr
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors'
--with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.8.3 20131129 (release) [ARM/embedded-4_8-branch revision 205641] (GNU Tools for ARM Embedded Processors)
Пишет варнинг, связанный с stdarg.h
CODE
In file included from ./../../src/si446x_api_lib.c:13:0:
./../../src/si446x_api_lib.c: In function 'si446x_set_property':
./../../src/si446x_api_lib.c:321:46: warning: 'U8' is promoted to 'int' when passed through '...' [enabled by default]
Pro2Cmd[cmdIndex] = va_arg (argList, U8);
^
./../../src/si446x_api_lib.c:321:46: note: (so you should pass 'int' not 'U8' to 'va_arg')
./../../src/si446x_api_lib.c:321:46: note: if this code is reached, the program will abort
Фрагмент исходника такой
Код
va_start (argList, START_PROP);
cmdIndex = 4;
while(NUM_PROPS--)
{
Pro2Cmd[cmdIndex] = va_arg (argList, U8);
cmdIndex++;
}
va_end(argList);
U8 соответственно = uint8_t, и там это нужно, а мог бы задать uint_least8_t и обмануть, не разбираясь в сути.
А тут - такое...
Куда копать?
Сообщение отредактировал IgorKossak - Jul 24 2014, 19:05
Причина редактирования: форматирование