F1ash / qt-virt-manager

Qt Virtual machines manager
http://f1ash.github.io/qt-virt-manager
GNU General Public License v2.0
233 stars 71 forks source link

src/virt_objects/virt_connect/conn_alive_thread.cpp: 2 * memset problems ? #9

Closed dcb314 closed 8 years ago

dcb314 commented 8 years ago

1.

src/virt_objects/virt_connect/conn_alive_thread.cpp:193:65: warning: argument to 'sizeof' in 'void* memset(void*, int, size_t)' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]

Source is

memset(&obj->authData.username[0], 0, sizeof(obj->authData.username));

2.

src/virt_objects/virt_connect/conn_alive_thread.cpp:205:65: warning: argument to 'sizeof' in 'void* memset(void*, int, size_t)' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]

  memset(&obj->authData.password[0], 0, sizeof(obj->authData.password));
F1ash commented 8 years ago

https://github.com/F1ash/qt-virt-manager/commit/2e5b191908f295a9ff26c6d14194a559b6297af5 fixed