codeghar / Seagull

Seagull is a free, Open Source (GPL) multi-protocol traffic generator test tool. Forked from upstream on Sourceforge. Patched to build on recent versions of Ubuntu, CentOS, and openSUSE.
GNU General Public License v2.0
50 stars 48 forks source link

Ubuntu 15.10 compiling fails #1

Closed sgel83 closed 8 years ago

sgel83 commented 8 years ago

Switch statements should not be boolean. This is why the error is happening. These switch statements should be changed to another type.

[Compiling generator-traffic/C_CallControl.cpp] generator-traffic/C_CallControl.cpp: In member function ‘virtual void C_CallControl::pause_traffic()’: generator-traffic/C_CallControl.cpp:1515:17: error: switch condition has type bool [-Werror=switch-bool] switch(m_pause) { ^ generator-traffic/C_CallControl.cpp: In member function ‘virtual void C_CallControlClient::pause_traffic()’: generator-traffic/C_CallControl.cpp:1538:17: error: switch condition has type bool [-Werror=switch-bool] switch(m_pause) { ^ generator-traffic/C_CallControl.cpp: In member function ‘virtual void C_CallControlClient::burst_traffic()’: generator-traffic/C_CallControl.cpp:1563:17: error: switch condition has type bool [-Werror=switch-bool] switch(m_pause) { ^ cc1plus: all warnings being treated as errors

sgel83 commented 8 years ago

Could you please add the modified files to your master.

Modifed: src/generator-traffic/C_CallControl.cpp src/generator-traffic/C_CallControl.hpp

to user an integer. Respecitively 0 = False 1 = True.

C_CallControl.zip

hamzasheikh commented 8 years ago

Thanks for getting the errors fixed. :+1:

Instead of providing the zip file can you provide a diff between my branch and yours? It'll be easier to apply. Even better would be a pull request. :)

hamzasheikh commented 8 years ago

Thank you for providing your changes. Tested to build on Ubuntu (14.04.3, 15.04, 15.10) and CentOS (7.1) before merging into master.

Your changes are now merged into master. Happy building!