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

Update spirv-tools to fix gcc warning #21

Merged
merged 1 commit into from
Apr 30, 2021
Merged

Update spirv-tools to fix gcc warning #21

merged 1 commit into from
Apr 30, 2021

Conversation

Jake-Shadle
Copy link
Member

Encountered a warning (which fails the build due to warnings as errors) for spirv-tools, so this updates to use the fix I added.

    cargo:warning=spirv-tools/source/diagnostic.cpp: In function ‘spv_diagnostic_t* spvDiagnosticCreate(spv_position, const char*)’:
    cargo:warning=spirv-tools/source/diagnostic.cpp:40:10: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Werror=stringop-truncation]
    cargo:warning=   40 |   strncpy(diagnostic->error, message, length);
    cargo:warning=      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cargo:warning=spirv-tools/source/diagnostic.cpp:31:25: note: length computed here
    cargo:warning=   31 |   size_t length = strlen(message) + 1;
    cargo:warning=      |                   ~~~~~~^~~~~~~~~
    cargo:warning=cc1plus: all warnings being treated as errors
    exit status: 1

@Jake-Shadle Jake-Shadle merged commit 5d2f367 into main Apr 30, 2021
@Jake-Shadle Jake-Shadle deleted the fix-gcc-warning branch April 30, 2021 13:57
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

Successfully merging this pull request may close these issues.

1 participant