Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

Branch on a garbage value #57

Open
TheQuantumPhysicist opened this issue Dec 6, 2018 · 0 comments
Open

Branch on a garbage value #57

TheQuantumPhysicist opened this issue Dec 6, 2018 · 0 comments

Comments

@TheQuantumPhysicist
Copy link
Contributor

TheQuantumPhysicist commented Dec 6, 2018

Clang analyzer shows this error:

Logic error: Branch condition evaluates to a garbage value
1: Calling 'tcp_client::process_write' in tacopie/sources/network/tcp_client.cpp:174
2: Assuming the condition is true in tacopie/sources/network/tcp_client.cpp:218
3: Returning from 'tcp_client::process_write' in tacopie/sources/network/tcp_client.cpp:174
4: Branch condition evaluates to a garbage value in tacopie/sources/network/tcp_client.cpp:176

The value result.success seems never to be initialized anywhere here:

  read_result result;
  auto callback = process_read(result);

  if (!result.success) {
    __TACOPIE_LOG(warn, "read operation failure");
    disconnect();
  }

While I see that process_read() does the initialization, I'm wondering whether there's something else missing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant