Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unchecked return values #113

Open
guijan opened this issue Jun 25, 2024 · 0 comments
Open

Unchecked return values #113

guijan opened this issue Jun 25, 2024 · 0 comments

Comments

@guijan
Copy link
Contributor

guijan commented Jun 25, 2024

Return values are sometimes not checked in swanstation:

m_pPrivateMemory = (u8*)std::malloc(new_size);
std::memcpy(m_pPrivateMemory, m_pMemory, m_iSize);

Event::Event(bool auto_reset /* = false */) : m_auto_reset(auto_reset)
{
pthread_mutex_init(&m_mutex, nullptr);
pthread_cond_init(&m_cv, nullptr);
}

There are other unchecked uses of these functions, and likely others.

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

No branches or pull requests

1 participant