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

Issue compiling #18

Closed
egandro opened this issue Mar 28, 2021 · 4 comments
Closed

Issue compiling #18

egandro opened this issue Mar 28, 2021 · 4 comments

Comments

@egandro
Copy link

egandro commented Mar 28, 2021

 $ go get github.com/swaggest/swgui/...
go: downloading golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2
go: downloading golang.org/x/text v0.3.2
# github.com/vearutop/statigz
/home/pi/.golib/pkg/mod/github.com/vearutop/statigz@v1.1.1/server.go:265:22: constant 9223372036854775807 overflows int

My GO version: $ go version
go version go1.16.2 linux/arm

@egandro
Copy link
Author

egandro commented Mar 28, 2021

I sort of got it.

size is set to maxint64. It is a int32 variable - so this causes the overflow.

@vearutop
Copy link
Member

Thank you for raising this issue, please try latest version v1.2.2 that should work properly.

@egandro
Copy link
Author

egandro commented Mar 28, 2021

Thank you!

@egandro
Copy link
Author

egandro commented Mar 28, 2021

Thank you for raising this issue, please try latest version v1.2.2 that should work properly.

Let me do an academic remark. It's 100% academic. We size_t of a file is afaik 64bit also on a 32bit Linux. So you might change the size to the coresponding type of the fstat() function.

I doubt that this will be ever a problem.

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

2 participants