ondrajz / go-callvis

Visualize call graph of a Go program using Graphviz
https://ofabry.github.io/go-callvis
MIT License
5.82k stars 402 forks source link

Compilation warnings on macOS 14.0 with Apple M2 chip #169

Open lamjack opened 8 months ago

lamjack commented 8 months ago

Hello,

I'm experiencing some compilation warnings when installing go-callvis on macOS 14.0 (23A344) with an Apple M2 chip. I thought it might be important to report this in case it affects other users or if it could potentially lead to issues down the line.

Environment:

Installation Command:

go install github.com/ofabry/go-callvis@latest

Warnings:

These warnings seem to point towards implicit truncation from 'int' to a one-bit wide bit-field and functions defined without prototypes, which are deprecated in current and future versions of C.

Despite these warnings, the installation completes, but I'm concerned about the potential for unexpected behavior or compatibility issues with future versions of Go or macOS.

Is this something that can be looked into? Any guidance on whether these warnings can be safely ignored or if they will be addressed in a future update would be appreciated.

Thank you for your time and for maintaining this project!

lamjack commented 8 months ago

More details:

go install github.com/ofabry/go-callvis@latest
go: downloading github.com/ofabry/go-callvis v0.7.0
go: downloading github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
go: downloading golang.org/x/tools v0.8.0
go: downloading github.com/goccy/go-graphviz v0.1.1
go: downloading golang.org/x/image v0.6.0
go: downloading github.com/fogleman/gg v1.3.0
go: downloading github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
go: downloading golang.org/x/mod v0.10.0
# github.com/goccy/go-graphviz/internal/ccall
In file included from common.c:5:
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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:
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]
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]