k1LoW / tbls

tbls is a CI-Friendly tool for document a database, written in Go.
MIT License
3.32k stars 164 forks source link

C warning in graphviz dependency #529

Open philippgille opened 8 months ago

philippgille commented 8 months ago

What happened

Hi 👋 , thanks for creating and maintaining this project!

I recently updated tbls from v1.68.2 to latest (1.70.1 as of today), and got some warnings when installing via Go 1.21.3.

Not sure about the impact on tbls functionality though.

What you expected to happened

I expected no warnings during installation

What stack trace or error message from tbls did you see?

$ go install github.com/k1LoW/tbls@v1.70.1
# github.com/goccy/go-graphviz/internal/ccall
In file included from common.c:5:
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/common/emit.c:165:35: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/common/emit.c:2540:24: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/common/emit.c:2596:35: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/common/emit.c:2602:35: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/common/emit.c:2612:31: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/common/emit.c:2623:31: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/common/emit.c:2628:31: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/common/emit.c:2641:28: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/common/emit.c:2650:33: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/common/emit.c:2659:32: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/common/emit.c:2668:32: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
# github.com/goccy/go-graphviz/internal/ccall
In file included from dotgen.c:15:
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/dotgen/dotsplines.c:2310:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
/Users/[redacted]/go/pkg/mod/github.com/goccy/go-graphviz@v0.1.1/internal/ccall/dotgen/dotsplines.c:2504:16: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]

Anything else we need to know?

I don't remember seeing that error when I installed the previous version, but trying just now with v1.68.2 it's the same warnings that are shown.

Environment

k1LoW commented 8 months ago

@philippgille Thank you for your report!!

This is a go-graphviz related issue. For example https://github.com/goccy/go-graphviz/pull/77 At this time it is a warning, so we do not consider it a major problem in tbls.

philippgille commented 8 months ago

Ah great to see there's already a PR for the library. Perfect 👌