Viva64-EM
full
54
/nfs/home/dmka/src/gearmand/libgearman/vector.hpp
error
V690
The 'gearman_vector_st' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
false
2
*/
struct gearman_vector_st {
char *end;
------------
[x] 2. 94e2d7a1ada3f32e9e4c482be4edcbfd0e7431e8
Viva64-EM
full
47
/nfs/home/dmka/src/gearmand/libgearman/server_options.hpp
error
V690
The 'gearman_server_options_st' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
false
2
struct gearman_server_options_st
{
- [x] 3. 658bef6aa12539d07448bf01b906dfe5a4083111
Viva64-EM
full
47
/nfs/home/dmka/src/gearmand/libgearman/connection.hpp
error
V690
The 'gearman_connection_st' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
false
2
struct gearman_connection_st
{
- [x] 4. c251161b630fb2b05d84951bc870703f02977c80
Viva64-EM
full
218
/nfs/home/dmka/src/gearmand/libgearman/packet.cc
error
V547
Expression is always false. Pointer 'gearman_packet_create(universal, packet)' != NULL.
false
2
{
if (gearman_packet_create(universal, packet) == NULL)
{
- [x] 5. 0851672f00504e2b4be7400681b1c43180d280c7
Viva64-EM
full
78
/nfs/home/dmka/src/gearmand/libgearman/interface/packet.hpp
error
V730
Not all members of a class are initialized inside the constructor. Consider inspecting: arg, arg_size, args_buffer.
false
2
Viva64-EM
full
149
/nfs/home/dmka/src/gearmand/libgearman/protocol/submit.cc
error
V576
Incorrect format. Consider checking the fourth actual argument of the 'snprintf' function. The UNSIGNED argument of memsize type is expected.
false
3
char time_string[30];
int length= snprintf(time_string, sizeof(time_string), "%" PRIu64, static_cast(when));
args[2]= time_string;
**7**. [This is here for API compatibility](https://github.com/gearman/gearmand/pull/114#discussion_r118826848)
Viva64-EM
full
103
/nfs/home/dmka/src/gearmand/libgearman/protocol/submit.cc
error
V524
It is odd that the body of 'submit_background' function is fully equivalent to the body of 'submit' function.
false
3
**8**. don't touch it. Is there any demand for [hashkit_key](https://github.com/p-alik/gearmand/blob/master/libhashkit/encrypt.cc#L52)? It looks like it's obsolete.
Viva64-EM
full
61
/nfs/home/dmka/src/gearmand/libhashkit/encrypt.cc
error
V542
Consider inspecting an odd type cast: 'void *' to 'bool'.
false
1
return bool(kit->_key);
}
- [x] 9. d6e0d12b3508a0fb63fcf6b8d9cf8263ff29c5bc
Viva64-EM
full
68
/nfs/home/dmka/src/gearmand/libgearman-server/struct/gearmand.h
error
V519
The '_keepalive' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 67, 68.
false
2
_keepalive= true;
keepalive= keepalive;
}
67,68
Viva64-EM
full
187
/nfs/home/dmka/src/gearmand/libgearman-server/plugins/protocol/http/protocol.cc
error
V576
Incorrect format. Consider checking the fourth actual argument of the 'snprintf' function. The UNSIGNED integer type argument is expected.
false
3
{
pack_size= (size_t)snprintf((char *)send_buffer, send_buffer_size,
"HTTP/1.0 %u %s\r\n"
Viva64-EM
full
70
/nfs/home/dmka/src/gearmand/libgearman-server/struct/packet.h
error
V730
Not all members of a class are initialized inside the constructor. Consider inspecting: arg, arg_size, args_buffer.
false
2
Viva64-EM
full
124
/nfs/home/dmka/src/gearmand/libgearman-server/struct/io.h
error
V730
Not all members of a class are initialized inside the constructor. Consider inspecting: options, _state, send_state, recv_state, events, revents, ...
false
3
Viva64-EM
full
179
/nfs/home/dmka/src/gearmand/libgearman-server/struct/io.h
error
V730
Not all members of a class are initialized inside the constructor. Consider inspecting: is_sleeping, is_exceptions, is_dead, is_noop_sent, is_cleaned_up, ret, ...
false
3
Viva64-EM
full
115
/nfs/home/dmka/src/gearmand/libgearman-server/struct/server.h
error
V730
Not all members of a class are initialized inside the constructor. Consider inspecting: flags, state, shutdown, shutdown_graceful, proc_wakeup, proc_shutdown, ...
false
3
Viva64-EM
full
55
/nfs/home/dmka/src/gearmand/libgearman-server/struct/port.h
error
V730
Not all members of a class are initialized inside the constructor. Consider inspecting: _remove_fn.
false
1
Viva64-EM
full
141
/nfs/home/dmka/src/gearmand/libgearman-server/struct/gearmand.h
error
V730
Not all members of a class are initialized inside the constructor. Consider inspecting: wakeup_event.
false
1
Viva64-EM
full
93
/nfs/home/dmka/src/gearmand/libgearman-server/plugins/queue/sqlite/queue.cc
error
V668
There is no sense in testing the 'exec_queue' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
false
2
if (exec_queue == NULL)
{
**18**. don't touch it
Viva64-EM
full
73
/nfs/home/dmka/src/gearmand/libgearman-server/byteorder.cc
error
V524
It is odd that the body of 'htonll' function is fully equivalent to the body of 'ntohll' function.
false
3
Viva64-EM
full
162
/nfs/home/dmka/src/gearmand/libgearman-server/gearmand_thread.cc
error
V730
Not all members of a class are initialized inside the constructor. Consider inspecting: wakeup_fd, server_thread, wakeup_event, id, lock.
false
1
Viva64-EM
full
642
/nfs/home/dmka/src/gearmand/libgearman-server/io.cc
error
V555
The expression of the 'A - B > 0' kind will work as 'A != B'.
false
2
/ If there is any room in the buffer, copy in data. /
if (packet->data and (GEARMAND_SEND_BUFFER_SIZE - connection->send_buffer_size) > 0)
{
Viva64-EM
full
130
/nfs/home/dmka/src/gearmand/libgearman-server/log.cc
error
V519
The 'error_to_report' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 126, 130.
false
2
case EHOSTDOWN:
error_to_report= GEARMAND_LOST_CONNECTION;
126,130
**22**. but it's conscious intention
Viva64-EM
full
294
/nfs/home/dmka/src/gearmand/libgearman-server/log.cc
error
V618
It's dangerous to call the 'snprintf' function in such a manner, as the line being passed could contain format specification. The example of the safe code: printf("%s", str);
false
2
size_t ask= snprintf(0, 0, format);
ask++; // for null
**23**. but it's conscious intention
Viva64-EM
full
437
/nfs/home/dmka/src/gearmand/libgearman-server/log.cc
error
V618
It's dangerous to call the 'snprintf' function in such a manner, as the line being passed could contain format specification. The example of the safe code: printf("%s", str);
false
2
size_t ask= snprintf(0, 0, format);
ask++; // for null
**24**. no doubt. init of `server_job` is in same block
Viva64-EM
full
812
/nfs/home/dmka/src/gearmand/libgearman-server/server.cc
error
V595
The 'server_job' pointer was utilized before it was verified against nullptr. Check lines: 812, 813.
false
1
"Exception being sent from: %.*s(%lu)",
server_job->function->function_name_size, server_job->function->function_name, server_job->function->function_name_size);
if (server_job == NULL)
812,813
**25**. no doubt. `pthread_attr_init(&attr)` is executed above
Viva64-EM
full
386
/nfs/home/dmka/src/gearmand/libgearman-server/thread.cc
error
V575
The null pointer is passed into 'pthread_attr_setscope' function. Inspect the second argument.
false
1
if ((error= pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)))
{
Viva64-EM
full
66
/nfs/home/dmka/src/gearmand/libgearman-server/timer.cc
error
V512
A call of the 'memset' function will lead to underflow of the buffer 'fds'.
false
1
{
memset(fds, 0, sizeof(pollfd));
fds[0].fd= -1; //STDIN_FILENO;
Viva64-EM
full
83
/nfs/home/dmka/src/gearmand/libgearman-server/timer.cc
error
V575
The null pointer is passed into 'pthread_exit' function. Inspect the first argument.
false
1
{
pthread_exit(NULL);
}
Viva64-EM
full
89
/nfs/home/dmka/src/gearmand/libgearman-server/timer.cc
error
V575
The null pointer is passed into 'pthread_exit' function. Inspect the first argument.
false
1
pthread_exit(NULL);
}
**29**. is it an issue?
Viva64-EM
full
79
/nfs/home/dmka/src/gearmand/libgearman/check.cc
error
V526
The 'memcmp' function returns 0 if corresponding buffers are equal. Consider examining the condition for mistakes.
false
3
if (memcmp(_workload, con->_packet.value(), compared))
{
**30**. is it an issue?
Viva64-EM
full
79
/nfs/home/dmka/src/gearmand/libgearman/check.cc
error
V526
The 'memcmp' function returns 0 if corresponding buffers are equal. Consider examining the condition for mistakes.
false
3
if (memcmp(_workload, con->_packet.value(), compared))
{
**31**. no doubt. There is `assert(task_shell->impl()->client)` above
Viva64-EM
full
231
/nfs/home/dmka/src/gearmand/libgearman/add.cc
error
V595
The 'task->client' pointer was utilized before it was verified against nullptr. Check lines: 231, 243.
false
1
{
gearman_log_debug(task->client->universal, "uuid_generate_time_safe() failed or does not exist on this platform");
}
231,243
Viva64-EM
full
949
/nfs/home/dmka/src/gearmand/libgearman/client.cc
error
V528
It is odd that pointer to 'bool' type is compared with the false value. Probably meant: *is_known == false.
false
1
if (is_known == false and is_running == false)
{
**33**. is it an issue?
Viva64-EM
full
1618
/nfs/home/dmka/src/gearmand/libgearman/client.cc
error
V526
The 'strncmp' function returns 0 if corresponding strings are equal. Consider examining the condition for mistakes.
false
3
{ }
else if (strncmp(client->task->impl()->job_handle,
static_cast<char *>(client->con->_packet.arg[0]),
**34**. no importance
Viva64-EM
full
526
/nfs/home/dmka/src/gearmand/libgearman/connection.cc
error
V555
The expression '(8192 - send_buffer_size) > 0' will work as '8192 != send_buffer_size'.
false
2
/ If there is any room in the buffer, copy in data. /
if (packet_arg.data and (GEARMAN_SEND_BUFFER_SIZE - send_buffer_size) > 0)
{
**35**. postponed
Viva64-EM
full
91
/nfs/home/dmka/src/gearmand/libgearman/connection.cc
error
V730
It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: send_buffer, recv_buffer.
false
3
**36**. no doubt. [See](https://stackoverflow.com/a/44285982/2789312)
Viva64-EM
full
671
/nfs/home/dmka/src/gearmand/libgearman/worker.cc
error
V506
Pointer to local variable 'unused' is stored outside the scope of this variable. Such a pointer will become invalid.
false
2
{
ret_ptr= &unused;
}
**37**. no doubt
Viva64-EM
full
820
/nfs/home/dmka/src/gearmand/libgearman/worker.cc
error
V595
The 'worker' pointer was utilized before it was verified against nullptr. Check lines: 820, 826.
false
1
}
assert(worker->job()->impl());
}
820,826
**38**. See 36.
Viva64-EM
full
1339
/nfs/home/dmka/src/gearmand/libgearman/worker.cc
error
V507
Pointer to local array 'timeout_buffer' is stored outside the scope of this array. Such a pointer will become invalid.
false
2
args_size[0]= function->length() + 1;
args[1]= timeout_buffer;
args_size[1]= strlen(timeout_buffer);
Viva64-EM
full
58
/nfs/home/dmka/src/gearmand/libtest/error.h
error
V690
The 'Error' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
false
2
Viva64-EM
full
41
/nfs/home/dmka/src/gearmand/libtest/exception.hpp
error
V690
The 'exception' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
false
2
Viva64-EM
full
43
/nfs/home/dmka/src/gearmand/libtest/exception/disconnected.hpp
error
V690
The 'disconnected' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class.
false
2
class disconnected : public libtest::exception
{
**42**. but it's conscious intention
Viva64-EM
full
107
/nfs/home/dmka/src/gearmand/libtest/comparison.hpp
error
V526
The 'strncmp' function returns 0 if corresponding strings are equal. Consider examining the condition for mistakes.
false
3
if (strncmp(expected, actual, strlen(__expected)))
{
- 43. a1e4dd9b1964e8ab93e0d0ad679c987672d4f15a
**this is merged to origin** https://github.com/gearman/gearmand/pull/187
Viva64-EM
full
59
/nfs/home/dmka/src/gearmand/libtest/thread.hpp
error
V509
The 'throw' operator inside the destructor should be placed within the try..catch block. Raising exception inside the destructor is illegal.
false
2
{
throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_cond_destroy: %s", strerror(_err));
}
Viva64-EM
full
92
/nfs/home/dmka/src/gearmand/libtest/thread.hpp
error
V509
The 'throw' operator inside the destructor should be placed within the try..catch block. Raising exception inside the destructor is illegal.
false
2
{
throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_mutex_unlock: %s", strerror(err));
}
Viva64-EM
full
132
/nfs/home/dmka/src/gearmand/libtest/thread.hpp
error
V509
The 'throw' operator inside the destructor should be placed within the try..catch block. Raising exception inside the destructor is illegal.
false
2
{
throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_cond_destroy: %s", strerror(err));
}
Viva64-EM
full
55
/nfs/home/dmka/src/gearmand/libtest/client.cc
error
V730
It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: _ai.
false
2
Viva64-EM
full
76
/nfs/home/dmka/src/gearmand/libtest/has.cc
error
V542
Consider inspecting an odd type cast: 'char ' to 'bool'.
false
1
char getenv_ptr;
if (bool((getenv_ptr= getenv("POSTGES_IS_RUNNING_AND_SETUP"))))
{
**48**. no doubt, works fine
Viva64-EM
full
97
/nfs/home/dmka/src/gearmand/libtest/has.cc
error
V542
Consider inspecting an odd type cast: 'char ' to 'bool'.
false
1
char getenv_ptr;
if (bool((getenv_ptr= getenv("PWD"))) and
((strcmp(GEARMAND_BINARY, "./gearmand/gearmand") == 0) or (strcmp(GEARMAND_BINARY, "gearmand/gearmand") == 0)))
**49**. conscious intention
Viva64-EM
full
98
/nfs/home/dmka/src/gearmand/libtest/has.cc
error
V549
The first argument of 'strcmp' function is equal to the second argument.
false
1
if (bool((getenv_ptr= getenv("PWD"))) and
((strcmp(GEARMAND_BINARY, "./gearmand/gearmand") == 0) or (strcmp(GEARMAND_BINARY, "gearmand/gearmand") == 0)))
{
Viva64-EM
full
71
/nfs/home/dmka/src/gearmand/libtest/is_local.cc
error
V601
The 'false' value is implicitly cast to the integer type. Inspect the third argument.
false
3
{
setenv("GEARMAND_CA_CERTIFICATE", YATL_CA_CERT_PEM, false);
setenv("GEARMAND_SERVER_PEM", YATL_CERT_PEM, false);
Viva64-EM
full
72
/nfs/home/dmka/src/gearmand/libtest/is_local.cc
error
V601
The 'false' value is implicitly cast to the integer type. Inspect the third argument.
false
3
setenv("GEARMAND_CA_CERTIFICATE", YATL_CA_CERT_PEM, false);
setenv("GEARMAND_SERVER_PEM", YATL_CERT_PEM, false);
setenv("GEARMAND_SERVER_KEY", YATL_CERT_KEY_PEM, false);
Viva64-EM
full
73
/nfs/home/dmka/src/gearmand/libtest/is_local.cc
error
V601
The 'false' value is implicitly cast to the integer type. Inspect the third argument.
false
3
setenv("GEARMAND_SERVER_PEM", YATL_CERT_PEM, false);
setenv("GEARMAND_SERVER_KEY", YATL_CERT_KEY_PEM, false);
setenv("GEARMAND_CLIENT_PEM", YATL_CERT_PEM, false);
Viva64-EM
full
74
/nfs/home/dmka/src/gearmand/libtest/is_local.cc
error
V601
The 'false' value is implicitly cast to the integer type. Inspect the third argument.
false
3
setenv("GEARMAND_SERVER_KEY", YATL_CERT_KEY_PEM, false);
setenv("GEARMAND_CLIENT_PEM", YATL_CERT_PEM, false);
setenv("GEARMAND_CLIENT_KEY", YATL_CERT_KEY_PEM, false);
Viva64-EM
full
75
/nfs/home/dmka/src/gearmand/libtest/is_local.cc
error
V601
The 'false' value is implicitly cast to the integer type. Inspect the third argument.
false
3
setenv("GEARMAND_CLIENT_PEM", YATL_CERT_PEM, false);
setenv("GEARMAND_CLIENT_KEY", YATL_CERT_KEY_PEM, false);
}
**55**. no doubt, works fine
Viva64-EM
full
223
/nfs/home/dmka/src/gearmand/libtest/main.cc
error
V542
Consider inspecting an odd type cast: 'char *' to 'bool'.
false
1
errno= 0;
if (bool(getenv("YATL_REPEAT")))
{
**56**. no doubt, works fine
Viva64-EM
full
234
/nfs/home/dmka/src/gearmand/libtest/main.cc
error
V542
Consider inspecting an odd type cast: 'char *' to 'bool'.
false
1
if ((bool(getenv("YATL_QUIET")) and (strcmp(getenv("YATL_QUIET"), "0") == 0)) or opt_quiet)
{
**57**. no doubt, works fine
Viva64-EM
full
240
/nfs/home/dmka/src/gearmand/libtest/main.cc
error
V542
Consider inspecting an odd type cast: 'char *' to 'bool'.
false
1
{
if (bool(getenv("YATL_QUIET")) and (strcmp(getenv("YATL_QUIET"), "1") == 0))
{ }
**58**. no doubt, works fine
Viva64-EM
full
248
/nfs/home/dmka/src/gearmand/libtest/main.cc
error
V542
Consider inspecting an odd type cast: 'char *' to 'bool'.
false
1
if ((bool(getenv("YATL_WILDCARD"))))
{
**59**. nothing wrong with the code fragment:
```c++
if ((bool(getenv("YATL_RUN_MASSIVE_TESTS"))) or opt_massive)
{
opt_massive= true;
}
Viva64-EM
full
253
/nfs/home/dmka/src/gearmand/libtest/main.cc
error
V001
A code fragment from '/nfs/home/dmka/src/gearmand/libtest/main.cc' cannot be analyzed.
false
3
------------
[x] 60. 1691b1b1fc53015bdfe2466f9c568a4d487c1bb6
Viva64-EM
full
163
/nfs/home/dmka/src/gearmand/libtest/port.cc
error
V519
The 'sin.sin_addr.s_addr' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 162, 163.
false
2
sin.sin_addr.s_addr= 0;
sin.sin_addr.s_addr= INADDR_ANY;
sin.sin_family= AF_INET;
162,163
------------
[x] 61. 2ced9d9d53df25fdecc4dfd678d25a93f0d03be1
Viva64-EM
full
112
/nfs/home/dmka/src/gearmand/libtest/server.cc
error
V730
Not all members of a class are initialized inside the constructor. Consider inspecting: _error_file, _error_line.
false
1
- 62. no doubt, but refactored 1253ca111f82cc45edab1c8557d736830085cfbf
**merged** https://github.com/gearman/gearmand/pull/205
Viva64-EM
full
93
/nfs/home/dmka/src/gearmand/libtest/signal.cc
error
V542
Consider inspecting an odd type cast: 'char *' to 'bool'.
false
1
if (bool(getenv("LIBTEST_IN_GDB")) == false)
{
- 63. no doubt, but refactored 9f133b73cde0f92f57eeee0b478510a92ed9e52d
**merged** https://github.com/gearman/gearmand/pull/205
Viva64-EM
full
201
/nfs/home/dmka/src/gearmand/libtest/signal.cc
error
V542
Consider inspecting an odd type cast: 'char *' to 'bool'.
false
1
sigemptyset(&set);
if (bool(getenv("LIBTEST_IN_GDB")) == false)
{
Viva64-EM
full
195
/nfs/home/dmka/src/gearmand/libtest/signal.cc
error
V730
Not all members of a class are initialized inside the constructor. Consider inspecting: __shutdown.
false
1
Viva64-EM
full
54
/nfs/home/dmka/src/gearmand/libhostile/t/pipe.c
error
V575
The null pointer is passed into 'pipe' function. Inspect the first argument.
false
1
{
ASSERT_TRUE(pipe(NULL) == -1);
ASSERT_TRUE(errno == EFAULT);
It's a copy of gearmand issues
List of the issues:
[x] 1. 84664512df5c94c5826417b6be95376599e87cac
[x] 2. 94e2d7a1ada3f32e9e4c482be4edcbfd0e7431e8
struct gearman_server_options_st {
Viva64-EM full 47 /nfs/home/dmka/src/gearmand/libgearman/connection.hpp error V690 The 'gearman_connection_st' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class. false 2
struct gearman_connection_st {
Viva64-EM full 218 /nfs/home/dmka/src/gearmand/libgearman/packet.cc error V547 Expression is always false. Pointer 'gearman_packet_create(universal, packet)' != NULL. false 2 { if (gearman_packet_create(universal, packet) == NULL) {
Viva64-EM full 78 /nfs/home/dmka/src/gearmand/libgearman/interface/packet.hpp error V730 Not all members of a class are initialized inside the constructor. Consider inspecting: arg, arg_size, args_buffer. false 2
gearman_packet_st(bool isallocted= false) : options(isallocted),
Viva64-EM full 149 /nfs/home/dmka/src/gearmand/libgearman/protocol/submit.cc error V576 Incorrect format. Consider checking the fourth actual argument of the 'snprintf' function. The UNSIGNED argument of memsize type is expected. false 3 char time_string[30]; int length= snprintf(time_string, sizeof(time_string), "%" PRIu64, static_cast(when));
args[2]= time_string;
Viva64-EM full 103 /nfs/home/dmka/src/gearmand/libgearman/protocol/submit.cc error V524 It is odd that the body of 'submit_background' function is fully equivalent to the body of 'submit' function. false 3
gearman_return_t submit_background(gearman_universal_st& universal, gearman_packet_st& message, 93,103
Viva64-EM full 61 /nfs/home/dmka/src/gearmand/libhashkit/encrypt.cc error V542 Consider inspecting an odd type cast: 'void *' to 'bool'. false 1
return bool(kit->_key); }
Viva64-EM full 68 /nfs/home/dmka/src/gearmand/libgearman-server/struct/gearmand.h error V519 The '_keepalive' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 67, 68. false 2 _keepalive= true; keepalive= keepalive; } 67,68
Viva64-EM full 187 /nfs/home/dmka/src/gearmand/libgearman-server/plugins/protocol/http/protocol.cc error V576 Incorrect format. Consider checking the fourth actual argument of the 'snprintf' function. The UNSIGNED integer type argument is expected. false 3 { pack_size= (size_t)snprintf((char *)send_buffer, send_buffer_size, "HTTP/1.0 %u %s\r\n"
Viva64-EM full 70 /nfs/home/dmka/src/gearmand/libgearman-server/struct/packet.h error V730 Not all members of a class are initialized inside the constructor. Consider inspecting: arg, arg_size, args_buffer. false 2
gearmand_packet_st(): magic(GEARMAN_MAGIC_TEXT),
Viva64-EM full 124 /nfs/home/dmka/src/gearmand/libgearman-server/struct/io.h error V730 Not all members of a class are initialized inside the constructor. Consider inspecting: options, _state, send_state, recv_state, events, revents, ... false 3
gearmand_io_st() { }
Viva64-EM full 179 /nfs/home/dmka/src/gearmand/libgearman-server/struct/io.h error V730 Not all members of a class are initialized inside the constructor. Consider inspecting: is_sleeping, is_exceptions, is_dead, is_noop_sent, is_cleaned_up, ret, ... false 3
gearman_server_con_st() {
Viva64-EM full 115 /nfs/home/dmka/src/gearmand/libgearman-server/struct/server.h error V730 Not all members of a class are initialized inside the constructor. Consider inspecting: flags, state, shutdown, shutdown_graceful, proc_wakeup, proc_shutdown, ... false 3
gearman_server_st() {
Viva64-EM full 55 /nfs/home/dmka/src/gearmand/libgearman-server/struct/port.h error V730 Not all members of a class are initialized inside the constructor. Consider inspecting: _remove_fn. false 1
gearmand_port_st() : listen_count(0),
Viva64-EM full 141 /nfs/home/dmka/src/gearmand/libgearman-server/struct/gearmand.h error V730 Not all members of a class are initialized inside the constructor. Consider inspecting: wakeup_event. false 1
gearmandst(const char *host, uint32t threads,
Viva64-EM full 93 /nfs/home/dmka/src/gearmand/libgearman-server/plugins/queue/sqlite/queue.cc error V668 There is no sense in testing the 'exec_queue' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. false 2
if (exec_queue == NULL) {
Viva64-EM full 73 /nfs/home/dmka/src/gearmand/libgearman-server/byteorder.cc error V524 It is odd that the body of 'htonll' function is fully equivalent to the body of 'ntohll' function. false 3
uint64_t htonll(uint64_t value) { 68,73
Viva64-EM full 162 /nfs/home/dmka/src/gearmand/libgearman-server/gearmand_thread.cc error V730 Not all members of a class are initialized inside the constructor. Consider inspecting: wakeup_fd, server_thread, wakeup_event, id, lock. false 1
gearmand_thread_st::gearmand_thread_st(gearmandst& gearmand): is_thread_lock(false),
Viva64-EM full 642 /nfs/home/dmka/src/gearmand/libgearman-server/io.cc error V555 The expression of the 'A - B > 0' kind will work as 'A != B'. false 2 / If there is any room in the buffer, copy in data. / if (packet->data and (GEARMAND_SEND_BUFFER_SIZE - connection->send_buffer_size) > 0) {
Viva64-EM full 130 /nfs/home/dmka/src/gearmand/libgearman-server/log.cc error V519 The 'error_to_report' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 126, 130. false 2 case EHOSTDOWN: error_to_report= GEARMAND_LOST_CONNECTION;
126,130
Viva64-EM full 294 /nfs/home/dmka/src/gearmand/libgearman-server/log.cc error V618 It's dangerous to call the 'snprintf' function in such a manner, as the line being passed could contain format specification. The example of the safe code: printf("%s", str); false 2
Viva64-EM full 437 /nfs/home/dmka/src/gearmand/libgearman-server/log.cc error V618 It's dangerous to call the 'snprintf' function in such a manner, as the line being passed could contain format specification. The example of the safe code: printf("%s", str); false 2
Viva64-EM full 812 /nfs/home/dmka/src/gearmand/libgearman-server/server.cc error V595 The 'server_job' pointer was utilized before it was verified against nullptr. Check lines: 812, 813. false 1 "Exception being sent from: %.*s(%lu)", server_job->function->function_name_size, server_job->function->function_name, server_job->function->function_name_size); if (server_job == NULL) 812,813
Viva64-EM full 386 /nfs/home/dmka/src/gearmand/libgearman-server/thread.cc error V575 The null pointer is passed into 'pthread_attr_setscope' function. Inspect the second argument. false 1
if ((error= pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM))) {
Viva64-EM full 66 /nfs/home/dmka/src/gearmand/libgearman-server/timer.cc error V512 A call of the 'memset' function will lead to underflow of the buffer 'fds'. false 1 { memset(fds, 0, sizeof(pollfd)); fds[0].fd= -1; //STDIN_FILENO;
Viva64-EM full 83 /nfs/home/dmka/src/gearmand/libgearman-server/timer.cc error V575 The null pointer is passed into 'pthread_exit' function. Inspect the first argument. false 1 { pthread_exit(NULL); }
Viva64-EM full 89 /nfs/home/dmka/src/gearmand/libgearman-server/timer.cc error V575 The null pointer is passed into 'pthread_exit' function. Inspect the first argument. false 1
pthread_exit(NULL); }
Viva64-EM full 79 /nfs/home/dmka/src/gearmand/libgearman/check.cc error V526 The 'memcmp' function returns 0 if corresponding buffers are equal. Consider examining the condition for mistakes. false 3
if (memcmp(_workload, con->_packet.value(), compared)) {
Viva64-EM full 79 /nfs/home/dmka/src/gearmand/libgearman/check.cc error V526 The 'memcmp' function returns 0 if corresponding buffers are equal. Consider examining the condition for mistakes. false 3
if (memcmp(_workload, con->_packet.value(), compared)) {
Viva64-EM full 231 /nfs/home/dmka/src/gearmand/libgearman/add.cc error V595 The 'task->client' pointer was utilized before it was verified against nullptr. Check lines: 231, 243. false 1 { gearman_log_debug(task->client->universal, "uuid_generate_time_safe() failed or does not exist on this platform"); } 231,243
Viva64-EM full 949 /nfs/home/dmka/src/gearmand/libgearman/client.cc error V528 It is odd that pointer to 'bool' type is compared with the false value. Probably meant: *is_known == false. false 1
Viva64-EM full 1618 /nfs/home/dmka/src/gearmand/libgearman/client.cc error V526 The 'strncmp' function returns 0 if corresponding strings are equal. Consider examining the condition for mistakes. false 3 { } else if (strncmp(client->task->impl()->job_handle, static_cast<char *>(client->con->_packet.arg[0]),
Viva64-EM full 526 /nfs/home/dmka/src/gearmand/libgearman/connection.cc error V555 The expression '(8192 - send_buffer_size) > 0' will work as '8192 != send_buffer_size'. false 2 / If there is any room in the buffer, copy in data. / if (packet_arg.data and (GEARMAN_SEND_BUFFER_SIZE - send_buffer_size) > 0) {
Viva64-EM full 91 /nfs/home/dmka/src/gearmand/libgearman/connection.cc error V730 It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: send_buffer, recv_buffer. false 3
gearman_connection_st::gearman_connection_st(gearman_universal_st &universalarg, const char* host, const char* service_): state(GEARMAN_CON_UNIVERSAL_ADDRINFO),
Viva64-EM full 671 /nfs/home/dmka/src/gearmand/libgearman/worker.cc error V506 Pointer to local variable 'unused' is stored outside the scope of this variable. Such a pointer will become invalid. false 2 { ret_ptr= &unused; }
Viva64-EM full 820 /nfs/home/dmka/src/gearmand/libgearman/worker.cc error V595 The 'worker' pointer was utilized before it was verified against nullptr. Check lines: 820, 826. false 1 } assert(worker->job()->impl()); } 820,826
Viva64-EM full 1339 /nfs/home/dmka/src/gearmand/libgearman/worker.cc error V507 Pointer to local array 'timeout_buffer' is stored outside the scope of this array. Such a pointer will become invalid. false 2 args_size[0]= function->length() + 1; args[1]= timeout_buffer; args_size[1]= strlen(timeout_buffer);
Viva64-EM full 58 /nfs/home/dmka/src/gearmand/libtest/error.h error V690 The 'Error' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class. false 2
class Error {
Viva64-EM full 41 /nfs/home/dmka/src/gearmand/libtest/exception.hpp error V690 The 'exception' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class. false 2
class exception : public std::exception {
Viva64-EM full 43 /nfs/home/dmka/src/gearmand/libtest/exception/disconnected.hpp error V690 The 'disconnected' class implements a copy constructor, but lacks the '=' operator. It is dangerous to use such a class. false 2
class disconnected : public libtest::exception {
Viva64-EM full 107 /nfs/home/dmka/src/gearmand/libtest/comparison.hpp error V526 The 'strncmp' function returns 0 if corresponding strings are equal. Consider examining the condition for mistakes. false 3
if (strncmp(expected, actual, strlen(__expected))) {
Viva64-EM full 59 /nfs/home/dmka/src/gearmand/libtest/thread.hpp error V509 The 'throw' operator inside the destructor should be placed within the try..catch block. Raising exception inside the destructor is illegal. false 2 { throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_cond_destroy: %s", strerror(_err)); }
Viva64-EM full 92 /nfs/home/dmka/src/gearmand/libtest/thread.hpp error V509 The 'throw' operator inside the destructor should be placed within the try..catch block. Raising exception inside the destructor is illegal. false 2 { throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_mutex_unlock: %s", strerror(err)); }
Viva64-EM full 132 /nfs/home/dmka/src/gearmand/libtest/thread.hpp error V509 The 'throw' operator inside the destructor should be placed within the try..catch block. Raising exception inside the destructor is illegal. false 2 { throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_cond_destroy: %s", strerror(err)); }
Viva64-EM full 55 /nfs/home/dmka/src/gearmand/libtest/client.cc error V730 It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: _ai. false 2
SimpleClient::SimpleClient(const std::string& hostname_, in_portt port) : _is_connected(false),
Viva64-EM full 76 /nfs/home/dmka/src/gearmand/libtest/has.cc error V542 Consider inspecting an odd type cast: 'char ' to 'bool'. false 1 char getenv_ptr; if (bool((getenv_ptr= getenv("POSTGES_IS_RUNNING_AND_SETUP")))) {
Viva64-EM full 97 /nfs/home/dmka/src/gearmand/libtest/has.cc error V542 Consider inspecting an odd type cast: 'char ' to 'bool'. false 1 char getenv_ptr; if (bool((getenv_ptr= getenv("PWD"))) and ((strcmp(GEARMAND_BINARY, "./gearmand/gearmand") == 0) or (strcmp(GEARMAND_BINARY, "gearmand/gearmand") == 0)))
Viva64-EM full 98 /nfs/home/dmka/src/gearmand/libtest/has.cc error V549 The first argument of 'strcmp' function is equal to the second argument. false 1 if (bool((getenv_ptr= getenv("PWD"))) and ((strcmp(GEARMAND_BINARY, "./gearmand/gearmand") == 0) or (strcmp(GEARMAND_BINARY, "gearmand/gearmand") == 0))) {
Viva64-EM full 71 /nfs/home/dmka/src/gearmand/libtest/is_local.cc error V601 The 'false' value is implicitly cast to the integer type. Inspect the third argument. false 3 { setenv("GEARMAND_CA_CERTIFICATE", YATL_CA_CERT_PEM, false); setenv("GEARMAND_SERVER_PEM", YATL_CERT_PEM, false);
Viva64-EM full 72 /nfs/home/dmka/src/gearmand/libtest/is_local.cc error V601 The 'false' value is implicitly cast to the integer type. Inspect the third argument. false 3 setenv("GEARMAND_CA_CERTIFICATE", YATL_CA_CERT_PEM, false); setenv("GEARMAND_SERVER_PEM", YATL_CERT_PEM, false); setenv("GEARMAND_SERVER_KEY", YATL_CERT_KEY_PEM, false);
Viva64-EM full 73 /nfs/home/dmka/src/gearmand/libtest/is_local.cc error V601 The 'false' value is implicitly cast to the integer type. Inspect the third argument. false 3 setenv("GEARMAND_SERVER_PEM", YATL_CERT_PEM, false); setenv("GEARMAND_SERVER_KEY", YATL_CERT_KEY_PEM, false); setenv("GEARMAND_CLIENT_PEM", YATL_CERT_PEM, false);
Viva64-EM full 74 /nfs/home/dmka/src/gearmand/libtest/is_local.cc error V601 The 'false' value is implicitly cast to the integer type. Inspect the third argument. false 3 setenv("GEARMAND_SERVER_KEY", YATL_CERT_KEY_PEM, false); setenv("GEARMAND_CLIENT_PEM", YATL_CERT_PEM, false); setenv("GEARMAND_CLIENT_KEY", YATL_CERT_KEY_PEM, false);
Viva64-EM full 75 /nfs/home/dmka/src/gearmand/libtest/is_local.cc error V601 The 'false' value is implicitly cast to the integer type. Inspect the third argument. false 3 setenv("GEARMAND_CLIENT_PEM", YATL_CERT_PEM, false); setenv("GEARMAND_CLIENT_KEY", YATL_CERT_KEY_PEM, false); }
Viva64-EM full 223 /nfs/home/dmka/src/gearmand/libtest/main.cc error V542 Consider inspecting an odd type cast: 'char *' to 'bool'. false 1 errno= 0; if (bool(getenv("YATL_REPEAT"))) {
Viva64-EM full 234 /nfs/home/dmka/src/gearmand/libtest/main.cc error V542 Consider inspecting an odd type cast: 'char *' to 'bool'. false 1
if ((bool(getenv("YATL_QUIET")) and (strcmp(getenv("YATL_QUIET"), "0") == 0)) or opt_quiet) {
Viva64-EM full 240 /nfs/home/dmka/src/gearmand/libtest/main.cc error V542 Consider inspecting an odd type cast: 'char *' to 'bool'. false 1 { if (bool(getenv("YATL_QUIET")) and (strcmp(getenv("YATL_QUIET"), "1") == 0)) { }
Viva64-EM full 248 /nfs/home/dmka/src/gearmand/libtest/main.cc error V542 Consider inspecting an odd type cast: 'char *' to 'bool'. false 1
if ((bool(getenv("YATL_WILDCARD")))) {
[x] 60. 1691b1b1fc53015bdfe2466f9c568a4d487c1bb6
[x] 61. 2ced9d9d53df25fdecc4dfd678d25a93f0d03be1
Server::Server(const std::string& host_arg, const in_port_t port_arg, const std::string& executable, const bool _is_libtool,
Viva64-EM full 93 /nfs/home/dmka/src/gearmand/libtest/signal.cc error V542 Consider inspecting an odd type cast: 'char *' to 'bool'. false 1
if (bool(getenv("LIBTEST_IN_GDB")) == false) {
Viva64-EM full 201 /nfs/home/dmka/src/gearmand/libtest/signal.cc error V542 Consider inspecting an odd type cast: 'char *' to 'bool'. false 1 sigemptyset(&set); if (bool(getenv("LIBTEST_IN_GDB")) == false) {
Viva64-EM full 195 /nfs/home/dmka/src/gearmand/libtest/signal.cc error V730 Not all members of a class are initialized inside the constructor. Consider inspecting: __shutdown. false 1
SignalThread::SignalThread() : magic_memory(MAGIC_MEMORY),
Viva64-EM full 54 /nfs/home/dmka/src/gearmand/libhostile/t/pipe.c error V575 The null pointer is passed into 'pipe' function. Inspect the first argument. false 1 { ASSERT_TRUE(pipe(NULL) == -1); ASSERT_TRUE(errno == EFAULT);