|
Bugzilla – Full Text Bug Listing |
| Summary: | variable ‘retOne’ set but not used, g++> 4.6.0 | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | John Abraham <john.abraham.in> |
| Component: | core | Assignee: | Mathieu Lacage <mathieu.lacage> |
| Status: | RESOLVED FIXED | ||
| Severity: | trivial | CC: | ns-bugs |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | patch | ||
Created attachment 1114 [details]
patch
patch... As we want to retain retOne and retTwo for the purpose of illustrating how to capture a return value from a callback, to me just typecasting to (void) is good enough
|
Waf: Entering directory `/root/ns-3-test/ns-3-allinone/ns-3-dev/build' [ 669/1561] cxx: src/core/examples/main-callback.cc -> build/debug/src/core/examples/main-callback_1.o ../src/core/examples/main-callback.cc: In function ‘int main(int, char**)’: ../src/core/examples/main-callback.cc:35:10: error: variable ‘retOne’ set but not used [-Werror=unused-but-set-variable] ../src/core/examples/main-callback.cc:47:7: error: variable ‘retTwo’ set but not used [-Werror=unused-but-set-variable] cc1plus: all warnings being treated as errors Waf: Leaving directory `/root/ns-3-test/ns-3-allinone/ns-3-dev/build' Build failed: -> task failed (err #1): {task: cxx main-callback.cc -> main-callback_1.o} [root@localhost ns-3-dev]# g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.6.0/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.6.0 20110428 (Red Hat 4.6.0-6) (GCC)