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

C compiler warns "Wformat-security" #11

Closed
danjenkins opened this issue Aug 23, 2023 · 2 comments
Closed

C compiler warns "Wformat-security" #11

danjenkins opened this issue Aug 23, 2023 · 2 comments

Comments

@danjenkins
Copy link
Contributor

Every time I start up using this module I get given this output

# github.com/go-gst/go-gst/gst
../../gst/gst_debug.go:14:63: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
../../gst/gst_debug.go:14:63: note: treat the string as an argument to avoid this

Let's see if we can get rid of them

@RSWilli
Copy link
Member

RSWilli commented Aug 24, 2023

This is a gcc / clang warning, as it is concerned about this line, which is C.

I think this may not be a MacOS only issue.

@RSWilli RSWilli changed the title MacOS improvement C compiler warns "Wformat-security" Aug 24, 2023
RSWilli added a commit that referenced this issue Sep 1, 2023
@RSWilli
Copy link
Member

RSWilli commented Sep 1, 2023

I was able to suppress this warning in #34 30a1223 by adding a pragma surrounding the line in question.

The compiler is actually right that this is a security issue, but I do not know how and if we should forward such a warning to something like go vet

@RSWilli RSWilli closed this as completed Sep 1, 2023
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