Commit a43b6fb
committed
unix: replace use of strcpy in mkerrors.sh
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.1 parent 81c8a6c commit a43b6fb
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
744 | | - | |
| 744 | + | |
| 745 | + | |
745 | 746 | | |
746 | 747 | | |
747 | 748 | | |
| |||
760 | 761 | | |
761 | 762 | | |
762 | 763 | | |
763 | | - | |
| 764 | + | |
| 765 | + | |
764 | 766 | | |
765 | 767 | | |
766 | 768 | | |
| |||
0 commit comments