Skip to content

Compilation warning about memcpy with gcc 11.2.0 #127

Description

@MEschenbacher

Hey, I'm using version 0.3.2 of this lib with go version 1.17.2 and go build prints a compilation warning but the build of my project succeeds.

I have applied system updates last night and I believe compiler versions have changed:
gcc from 10.2.1 to 11.2.0

# crawshaw.io/sqlite
In file included from ../../../go/pkg/mod/crawshaw.io/sqlite@v0.3.2/static.go:19:
../../../go/pkg/mod/crawshaw.io/sqlite@v0.3.2/./c/sqlite3.c: In function ‘sqlite3Fts5IndexQuery’:
../../../go/pkg/mod/crawshaw.io/sqlite@v0.3.2/./c/sqlite3.c:220863:18: warning: ‘memcpy’ specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
220863 |     if( nToken ) memcpy(&buf.p[1], pToken, nToken);
       |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions