[Tinyos-help] Compile warnings
John Regehr
regehr at cs.utah.edu
Tue Jun 3 09:19:25 PDT 2008
The "unused variable" warnings are a side effect of our Safe TinyOS
patches. Creating safe code sometimes requires introducing temporaries
that are in fact unused when you compile code in unsafe (i.e. default)
mode. The nature of these temporary values is such that they will not
cause a smart compiler to generate worse object code.
Anyway we're aware of the warnings and want to get rid of them. One way
would be to adopt a naming convention for them (e.g. safeTmpLen or
similar) and then filter out warnings about those variables. That is kind
of gross. I'm open to suggestions.
John Regehr
On Tue, 3 Jun 2008, David wrote:
> Hi list.
>
> I'm using the latest tinyos2.x CVS, and recently I've been getting a
> lot of compilation warnings like this:
>
> =====OUTPUT=====
>
> david at lnxdavid:~/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/apps/tests/deluge/Blink$
> make telosb
> mkdir -p build/telosb
> compiling BlinkAppC to a telosb binary
> ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul -Wall -Wshadow
> -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board=
> -DDEFINED_TOS_AM_GROUP=0x22 -Ibuild/telosb -DDELUGE
> -I/home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/lib/net
> -I/home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/lib/net/drip
> -I/home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/lib/net/Deluge
> -I/home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/lib/net/Deluge/FlashVolumeManager
> -I/home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/lib/net/Deluge/BlockStorageManager
> -I/home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/lib/net/Deluge/extra
> -I/home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/lib/net/Deluge/extra/msp430
> -I/home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/lib/net/Deluge/extra/telos
> -I/home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/lib/net/Deluge/extra/telosb
> -Wl,--section-start=.text=0x4a00,--defsym=_reset_vector__=0x4000
> -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"david\"
> -DIDENT_HOSTNAME=\"lnxdavid\" -DIDENT_USERHASH=0xb4cd1e4cL
> -DIDENT_TIMESTAMP=0x484505f6L -DIDENT_UIDHASH=0x9b3be594L
> BlinkAppC.nc -lm
> /home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/chips/cc2420/lpl/DummyLplC.nc:39:2:
> warning: #warning "*** LOW POWER COMMUNICATIONS DISABLED ***"
> /home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc:66:2:
> warning: #warning Accessing TimerA for ADC12
> /home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/chips/cc2420/receive/CC2420ReceiveP.nc:
> In function `CC2420ReceiveP$receiveDone_task$runTask':
> /home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/chips/cc2420/receive/CC2420ReceiveP.nc:329:
> warning: unused variable `tmpLen'
> /home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/chips/cc2420/receive/CC2420ReceiveP.nc:
> In function `CC2420ReceiveP$RXFIFO$readDone':
> /home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/chips/cc2420/receive/CC2420ReceiveP.nc:198:
> warning: unused variable `tmpLen'
> /home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/chips/cc2420/transmit/CC2420TransmitP.nc:
> In function `CC2420TransmitP$loadTXFIFO':
> /home/david/dev/internet/tinyos/tinyos2/git_checkout/tinyos-2.x/tos/chips/cc2420/transmit/CC2420TransmitP.nc:658:
> warning: unused variable `tmpLen'
> compiled BlinkAppC to build/telosb/main.exe
> 31506 bytes in ROM
> 960 bytes in RAM
> msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex
> writing TOS image
>
> ================
>
> Is this normal?
>
> David.
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
More information about the Tinyos-help
mailing list