Bug 1961

Summary: planetlab-tap-creator "variable set but not used"
Product: ns-3 Reporter: Tommaso Pecorella <tommaso.pecorella>
Component: fd-net-deviceAssignee: alina <aquereilhac>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: Linux   

Description Tommaso Pecorella 2014-08-06 02:10:43 UTC
Reported here:
https://groups.google.com/forum/?hl=en#!topic/ns-3-users/_s3VowiLV5w

NS-3: ns-allinone-3.20
OS: Ubuntu 14.04

=======================================================================
../src/fd-net-device/helper/planetlab-tap-creator.cc: In function ‘void SetTunUp(const char*, const char*, const char*)’:
../src/fd-net-device/helper/planetlab-tap-creator.cc:145:7: error: variable ‘nbytes’ set but not used [-Werror=unused-but-set-variable]
   int nbytes;
       ^
cc1plus: all warnings being treated as errors
Waf: Leaving directory `/home/nvha/NS-3/ns-allinone-3.20/ns-3.20/build'
Build failed
 -> task in 'planetlab-tap-creator' failed (exit status 1): 
	{task 139829064940176: cxx planetlab-tap-creator.cc -> planetlab-tap-creator.cc.6.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_SQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_GSL=1', '../src/fd-net-device/helper/planetlab-tap-creator.cc', '-c', '-o', 'src/fd-net-device/helper/planetlab-tap-creator.cc.6.o']
=======================================================================
Comment 1 alina 2014-08-06 08:49:46 UTC
(In reply to Tommaso Pecorella from comment #0)
> Reported here:
> https://groups.google.com/forum/?hl=en#!topic/ns-3-users/_s3VowiLV5w
> 
> NS-3: ns-allinone-3.20
> OS: Ubuntu 14.04
> 
> =======================================================================
> ../src/fd-net-device/helper/planetlab-tap-creator.cc: In function ‘void
> SetTunUp(const char*, const char*, const char*)’:
> ../src/fd-net-device/helper/planetlab-tap-creator.cc:145:7: error: variable
> ‘nbytes’ set but not used [-Werror=unused-but-set-variable]
>    int nbytes;
>        ^
> cc1plus: all warnings being treated as errors
> Waf: Leaving directory `/home/nvha/NS-3/ns-allinone-3.20/ns-3.20/build'
> Build failed
>  -> task in 'planetlab-tap-creator' failed (exit status 1): 
> 	{task 139829064940176: cxx planetlab-tap-creator.cc ->
> planetlab-tap-creator.cc.6.o}
> ['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror',
> '-Wno-error=deprecated-declarations', '-fstrict-aliasing',
> '-Wstrict-aliasing', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE',
> '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1',
> '-DHAVE_PACKET_H=1', '-DHAVE_SQLITE3=1', '-DHAVE_IF_TUN_H=1',
> '-DHAVE_GSL=1', '../src/fd-net-device/helper/planetlab-tap-creator.cc',
> '-c', '-o', 'src/fd-net-device/helper/planetlab-tap-creator.cc.6.o']
> =======================================================================

Thanks for reporting this bug. Fixed in changeset e6e590450831 of ns-3-dev.