Variable initialization does not happen everywhere on certain platforms

I have a program that I built for RHEL5 32 bit and ubuntu10 64 bit (C ++ qt4.6). When I run the program on ubuntu, all variables are initialized without the need to code this initialization. But when I run the program on RHEL, some of the variables are not initialized, I noticed that they are basically an integer type, and typical values ​​are about 154280152. The funny thing is that this happens only in a few classes. How can it be?

update: here is a snippet of code, this is the heading of one of the classes where this happens (sorry for the layout I’m considering now):
#ifndef FCP_CONFIG_H
#define FCP_CONFIG_H
#include "ui_fcpConfig.h" #include
#include "fpsengine.h"
#include "fcp_cfg_delegate.h"
#define SET_COL 3
#define GLOBAL_KEY_COL 2
#define LOCAL_KEY_COL 1
#define ENABLE_COL 0
namespace Ui
{
class fcpConfig;
}

class fcpConfig : public QWidget  
{  
Q_OBJECT  

public:  
fcpConfig(QWidget *parent, FPSengine * FPS);  
Ui::fcpConfigForm ui;  
void setupFcpCfg();  

private:  
QWidget * myParent;  
FPSengine * myFPS;  

fcpCfgDelegate delegate;  
QList<QSpinBox*>failOrderList;  
QList<QRadioButton*>primaryList;  

int numFCP;  
QList<int>numFcpInEachSet;  
int currentSet;  

void updateSets();
void refreshFailorderDuringUserEdit(int fcpPos);
QSignalMapper * signalMapper;
QMutex mutex;
void sendSysStatusMsgAndPopup(QString msg);
int curSet;   //the connected Fcp Set  

private slots:  

void updateFcpFailOrderSpinBox(int absPos);
void on_twFCP_cellClicked( int row, int column );
void on_buttonBox_clicked(QAbstractButton* button);

private:  
template <class T>  
    void buildObjList(QObject * location,QList<T> *cmdEleList,QString objName, int numObj){  
        T pCmdEle;  
        cmdEleList->clear();  
        for(int i=0;i<numObj;i++){  
            pCmdEle = location->findChild<T>(objName+QString("%1").arg(i+1));  
            cmdEleList->append(pCmdEle);  
        }  
    }  

//used to send SysStatus and popuMsg when number of active Fcps in Set not 1  
QString activeList;  //build a string representing Fcp numbers that are active.  
int iNumActive;  
};  
#endif // FCP_CONFIG_H

code>

+3
1

. , , . , . , . .

+10

Source: https://habr.com/ru/post/1768715/


All Articles