In file included from ..\Project\main_con_SLP_punto_H.cpp:7:0: ..\Project\/SLP.H: In constructor 'SLP::SLP(int, int)': ..\Project\/SLP.H:86:7: warning: 'SLP::n_variables' will be initialized after ..\Project\/SLP.H:83:7: warning: 'int SLP::max_operations_L' ..\Project\/SLP.H:122:1: warning: when initialized here ..\Project\/SLP.H: In member function 'float SLP::Calcula_Output(const std::vector<float>&, const std::vector<bool>&, const std::vector<float>&)': ..\Project\/SLP.H:255:55: warning: comparison between signed and unsigned integer expressions ..\Project\/SLP.H:264:55: warning: comparison between signed and unsigned integer expressions ..\Project\/SLP.H:293:39: warning: comparison between signed and unsigned integer expressions ..\Project\/SLP.H:299:56: warning: comparison between signed and unsigned integer expressions ..\Project\/SLP.H: In member function 'float SLP::Calcula_Operando_Variables(int, const std::vector<float>&, const std::vector<float>&)': ..\Project\/SLP.H:325:20: warning: comparison between signed and unsigned integer expressions In file included from ..\Project\main_con_SLP_punto_H.cpp:8:0: ..\Project\/Individuo.H: In constructor 'Individuo::Individuo(int, int, float, float)': ..\Project\/Individuo.H:94:16: warning: 'Individuo::max_operations_L' will be initialized after ..\Project\/Individuo.H:85:9: warning: 'float Individuo::limite_inferior' ..\Project\/Individuo.H:121:1: warning: when initialized here In file included from ..\Project\main_con_SLP_punto_H.cpp:9:0: ..\Project\/Poblacion.H: In member function 'void Poblacion::Calcula_Fitness_Poblacion(std::string, const int&, SLP)': ..\Project\/Poblacion.H:212:37: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H: In member function 'Individuo Poblacion::Mejor_Individuo()': ..\Project\/Poblacion.H:296:38: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H:304:38: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H: In member function 'int Poblacion::K_Torneo(int)': ..\Project\/Poblacion.H:349:42: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H: In member function 'int Poblacion::Ruleta()': ..\Project\/Poblacion.H:363:38: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H:370:39: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H:389:39: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H:399:39: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H: In member function 'void Poblacion::Cruce_1_punto_selectivo(Individuo&, Individuo&, Individuo&, Individuo&, SLP)': ..\Project\/Poblacion.H:519:46: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H: In member function 'void Poblacion::Cruce_uniforme(Individuo&, Individuo&, Individuo&, Individuo&)': ..\Project\/Poblacion.H:585:44: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H:594:42: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H:617:44: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H:633:42: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H: In member function 'void Poblacion::Cruce_uniforme_selectivo(Individuo&, Individuo&, Individuo&, Individuo&, SLP)': ..\Project\/Poblacion.H:660:52: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H:713:44: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H:791:57: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H: In member function 'void Poblacion::Mutacion(Individuo&)': ..\Project\/Poblacion.H:820:6: warning: unused variable 'prob_real' In file included from ..\Project\main_con_SLP_punto_H.cpp:10:0: ..\Project\/Algoritmo.H: In constructor 'Algoritmo::Algoritmo(int, int, int, float, float, std::string, int, int, int, int, float, float, int, int)': ..\Project\/Algoritmo.H:234:42: warning: comparison between signed and unsigned integer expressions ..\Project\/Algoritmo.H:377:48: warning: comparison between signed and unsigned integer expressions ..\Project\/Algoritmo.H:399:48: warning: comparison between signed and unsigned integer expressions ..\Project\/Algoritmo.H:486:46: warning: comparison between signed and unsigned integer expressions ..\Project\/Poblacion.H: In member function 'int Poblacion::Ruleta()': ..\Project\/Poblacion.H:409:1: warning: control reaches end of non-void function ..\Project\/Poblacion.H: In member function 'int Poblacion::K_Torneo(int)': ..\Project\/Poblacion.H:354:1: warning: control reaches end of non-void function ..\Project\/Poblacion.H: In member function 'Individuo Poblacion::Mejor_Individuo()': ..\Project\/Poblacion.H:312:1: warning: control reaches end of non-void function |
|
|
|
|
(tamanio_Ui/2)-components.size()
is not certainly non-negative unless this is guaranteed by the logic of the code. Check it out. It is enough to become even -1, and it will cause a near infinite loop. Converting -1 to unsigned integer results in the value 0xFFFF...(tamanio_Ui/2)-components.size()
could be negative.(tamanio_Ui/2)-components.size()
because (tamanio_Ui/2)
will always have at least components.size() + 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|