This has been seen with gcc 4.4.5 on a 32 bit machine.
consumer.c: In function ‘consumer_add_relayd_socket’:
consumer.c:3002: warning: ‘relayd’ may be used uninitialized in this
function
However, the relayd pointer can not be used uninitialized so this patch
suppresses the warning.
Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
{
int fd = -1, ret = -1, relayd_created = 0;
enum lttng_error_code ret_code = LTTNG_OK;
- struct consumer_relayd_sock_pair *relayd;
+ struct consumer_relayd_sock_pair *relayd = NULL;
assert(ctx);
assert(relayd_sock);