-
Notifications
You must be signed in to change notification settings - Fork 580
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
unix: replace use of strcpy in mkerrors.sh #147
Conversation
This PR (HEAD: 13a853a) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/sys/+/468399 to see it. Tip: You can toggle comments from me using the |
Message from Ian Lance Taylor: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/468399. |
On OpenBSD-current, clang emits a warning message to standard output for the use of strcpy, e.g.: _errors.c(/tmp/_errors-673190.o:(main)): warning: strcpy() is almost always misused, please use strlcpy() This message makes it into the Go source being created, causing gofmt to error on the invalid syntax, and leaving the zerrors file empty. Using strlcpy would be preferred here, but strncpy is enough to silence this message, and is more portable.
This PR (HEAD: a43b6fb) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/sys/+/468399 to see it. Tip: You can toggle comments from me using the |
Message from Josh Rickmar: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468399. |
Message from Ian Lance Taylor: Patch Set 2: Auto-Submit+1 Code-Review+2 Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468399. |
Message from Gopher Robot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468399. |
Message from Gopher Robot: Patch Set 2: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468399. |
On OpenBSD-current, clang emits a warning message to standard output for the use of strcpy, e.g.: _errors.c(/tmp/_errors-673190.o:(main)): warning: strcpy() is almost always misused, please use strlcpy() This message makes it into the Go source being created, causing gofmt to error on the invalid syntax, and leaving the zerrors file empty. Using strlcpy would be preferred here, but strncpy is enough to silence this message, and is more portable. Change-Id: I16404d74c4406dadda87f211fc0ba062de0d11ac GitHub-Last-Rev: a43b6fb GitHub-Pull-Request: #147 Reviewed-on: https://go-review.googlesource.com/c/sys/+/468399 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: David Chase <[email protected]>
This PR is being closed because golang.org/cl/468399 has been merged. |
On OpenBSD-current, clang emits a warning message to standard output for the use of strcpy, e.g.:
_errors.c(/tmp/_errors-673190.o:(main)): warning: strcpy() is almost always misused, please use strlcpy()
This message makes it into the Go source being created, causing gofmt to error on the invalid syntax, and leaving the zerrors file empty.
Using strlcpy would be preferred here, but strncpy is enough to silence this message, and is more portable.