코드 정적분석_C_plus_plus_2019_06_07 - lge-robot-navi/Multi-modal-Sensor-based-System GitHub Wiki

sensors/ax5 와 sensors/rgbgs 같은 종류의 코드

파일 분류 문제점






개선 방안
sensors\rgbgs\src\gev_camera.cpp 경고 126 %ld in format string (no. 1) requires 'long' but the argument type is 'signed long long'. %ld → %lld
C:\Users\changbin.won\Desktop\gathering\sensors\ax5\src\grabber.cpp 스타일 58 Variable 'pHandle' is reassigned a value before the old one has been used.

void* pHandle = nullptr;

int retCode = 0;


pHandle = MemSync_GetHandle();


int retCode = 0;


void* pHandle = MemSync_GetHandle();

sensors\ax5\src\saver.cpp 스타일 95 Variable 'pHandle' is reassigned a value before the old one has been used.

void* pHandle = nullptr;

int retCode = 0;


pHandle = MemSync_GetHandle();


int retCode = 0;


void* pHandle = MemSync_GetHandle();

sensors\ax5\src\saver.cpp 스타일 139

int c_time_hook = 0;

while(flag_running == true)
{
epoch_ms = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());
c_time_hook = (int)((epoch_ms.count() % 1000) / (1000 / saving_rate));


while(flag_running == true)
{
epoch_ms = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());
int c_time_hook = (int)((epoch_ms.count() % 1000) / (1000 / saving_rate));

sensors\realsense\src\grabber.cpp 스타일 127 Variable 'pHandle' is reassigned a value before the old one has been used.

void* pHandle = nullptr;

int retCode = 0;


pHandle = MemSync_GetHandle();


int retCode = 0;


void* pHandle = MemSync_GetHandle();

sensors\realsense\src\saver.cpp 스타일 118 Variable 'pHandle' is reassigned a value before the old one has been used.

void* pHandle = nullptr;

int retCode = 0;


pHandle = MemSync_GetHandle();


int retCode = 0;


void* pHandle = MemSync_GetHandle();

sensors\realsense\src\saver.cpp 스타일 182 The scope of the variable 'c_time_hook' can be reduced.

int c_time_hook = 0;


while(flag_running == true)

{

epoch_ms = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());

c_time_hook = (int)((epoch_ms.count() % 1000) / (1000 / saving_rate));



while(flag_running == true)

{

epoch_ms = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());

int c_time_hook = (int)((epoch_ms.count() % 1000) / (1000 / saving_rate));

sensors\rgbgs\src\grabber.cpp 스타일 57 Variable 'pHandle' is reassigned a value before the old one has been used.

void* pHandle = nullptr;

int retCode = 0;


pHandle = MemSync_GetHandle();


int retCode = 0;


void* pHandle = MemSync_GetHandle();

sensors\rgbgs\src\saver.cpp 스타일 96 Variable 'pHandle' is reassigned a value before the old one has been used.

void* pHandle = nullptr;

int retCode = 0;


pHandle = MemSync_GetHandle();


int retCode = 0;


void* pHandle = MemSync_GetHandle();

sensors\rgbgs\src\saver.cpp 스타일 140 The scope of the variable 'c_time_hook' can be reduced.

int c_time_hook = 0;


while(flag_running == true)

{

epoch_ms = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());

c_time_hook = (int)((epoch_ms.count() % 1000) / (1000 / saving_rate));



while(flag_running == true)

{

epoch_ms = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());

int c_time_hook = (int)((epoch_ms.count() % 1000) / (1000 / saving_rate));

sensors\ax5\src\gev_camera.cpp 성능 93 Prefer prefix ++/-- operators for non-primitive types. lIt++; ++lIt;
sensors\rgbgs\src\gev_camera.cpp 성능 93 Prefer prefix ++/-- operators for non-primitive types. lIt++; ++lIt;
⚠️ **GitHub.com Fallback** ⚠️