We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Input data:
package main import "unsafe" import "reflect" type pthread_attr_t [56]byte func (self *pthread_attr_t) cast(t reflect.Type) reflect.Value { return reflect.NewAt(t, unsafe.Pointer(&self[0])) }
Output of unused program:
unused
exit.go:6:6: type pthread_attr_t is unused (U1000)
The text was updated successfully, but these errors were encountered:
Please clarify - that is happen because that func cast is not used in func main.
cast
main
Sorry, something went wrong.
The program you provided is not valid, it's missing main function.
Given the following program with a main, unused correctly reports that type pthread_attr_t is unused:
type pthread_attr_t is unused
package main import "unsafe" import "reflect" type pthread_attr_t [56]byte func (self *pthread_attr_t) cast(t reflect.Type) reflect.Value { return reflect.NewAt(t, unsafe.Pointer(&self[0])) } func main() {}
The following program does not produce any output from unused:
package main import "unsafe" import "reflect" type pthread_attr_t [56]byte func (self *pthread_attr_t) cast(t reflect.Type) reflect.Value { return reflect.NewAt(t, unsafe.Pointer(&self[0])) } func main() { var x pthread_attr_t x.cast(reflect.TypeOf(0)) }
Because both pthread_attr_t and its cast method are used.
pthread_attr_t
What's this issue about?
Thanks
No branches or pull requests
Input data:
Output of
unused
program:The text was updated successfully, but these errors were encountered: