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

debug/pe: Unnecessary type cast #7104

Closed
gopherbot opened this issue Jan 11, 2014 · 2 comments
Closed

debug/pe: Unnecessary type cast #7104

gopherbot opened this issue Jan 11, 2014 · 2 comments

Comments

@gopherbot
Copy link

by NtVisigoth:

My Go installation with "go version":
go version go1.2 windows/amd64

I see in "GOROOT\src\pkg\debug\pe\file.go" unnessary type cast in a function
with prototype "func NewFile(r io.ReaderAt) (*File, error)"

        s := new(Section)
        s.SectionHeader = SectionHeader{
// skiped
            VirtualSize:          uint32(sh.VirtualSize),
// skiped more lines
        }

Why in this part of code use type cast? Field types of Section and SectionHeader32
structures are equalent!
@ianlancetaylor
Copy link
Contributor

Comment 1:

I agree that it's unnecessary.  Want to send a CL?  See
http://golang.org/doc/contribute.html .

Labels changed: added release-none, repo-main.

Status changed to Accepted.

@ianlancetaylor
Copy link
Contributor

Comment 2:

This issue was closed by revision c507601.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants