Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(90)

Issue 7378061: code review 7378061: cmd/vet: check argument types in printf formats (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by r
Modified:
12 years, 3 months ago
Reviewers:
CC:
gri, rsc, golang-dev
Visibility:
Public.

Description

cmd/vet: check argument types in printf formats Fixes issue 4404.

Patch Set 1 #

Patch Set 2 : diff -r 16ab8cd39afe https://code.google.com/p/go/ #

Total comments: 14

Patch Set 3 : diff -r 16ab8cd39afe https://code.google.com/p/go/ #

Patch Set 4 : diff -r 16ab8cd39afe https://code.google.com/p/go/ #

Patch Set 5 : diff -r 04d884e0f760 https://code.google.com/p/go/ #

Patch Set 6 : diff -r 04d884e0f760 https://code.google.com/p/go/ #

Total comments: 6

Patch Set 7 : diff -r 5e5bff52a1a7 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -65 lines) Patch
M src/cmd/vet/Makefile View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/vet/atomic.go View 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/vet/main.go View 2 chunks +6 lines, -1 line 0 comments Download
M src/cmd/vet/print.go View 1 2 3 4 5 6 10 chunks +204 lines, -62 lines 0 comments Download
A src/cmd/vet/print_unsafe.go View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 10
r
Hello gri (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years, 3 months ago (2013-02-23 18:12:26 UTC) #1
rsc
If you care. https://codereview.appspot.com/7378061/diff/2001/src/cmd/vet/print.go File src/cmd/vet/print.go (right): https://codereview.appspot.com/7378061/diff/2001/src/cmd/vet/print.go#newcode18 src/cmd/vet/print.go:18: "unsafe" // just for test case ...
12 years, 3 months ago (2013-02-23 18:28:54 UTC) #2
r
Hello gri@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 3 months ago (2013-02-23 18:43:11 UTC) #3
r
PTAL https://codereview.appspot.com/7378061/diff/2001/src/cmd/vet/print.go File src/cmd/vet/print.go (right): https://codereview.appspot.com/7378061/diff/2001/src/cmd/vet/print.go#newcode18 src/cmd/vet/print.go:18: "unsafe" // just for test case printing unsafe.Pointer ...
12 years, 3 months ago (2013-02-23 18:44:00 UTC) #4
gri
LGTM https://codereview.appspot.com/7378061/diff/2001/src/cmd/vet/atomic.go File src/cmd/vet/atomic.go (right): https://codereview.appspot.com/7378061/diff/2001/src/cmd/vet/atomic.go#newcode13 src/cmd/vet/atomic.go:13: // checkAtomicAssignment walks the assignment statement checking for ...
12 years, 3 months ago (2013-02-23 18:51:12 UTC) #5
r
Hello gri@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 3 months ago (2013-02-23 18:51:29 UTC) #6
r
https://codereview.appspot.com/7378061/diff/2001/src/cmd/vet/print.go File src/cmd/vet/print.go (right): https://codereview.appspot.com/7378061/diff/2001/src/cmd/vet/print.go#newcode110 src/cmd/vet/print.go:110: func (f *File) checkPrintf(call *ast.CallExpr, name string, skip int) ...
12 years, 3 months ago (2013-02-23 19:08:17 UTC) #7
r
Hello gri@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 3 months ago (2013-02-23 19:08:29 UTC) #8
gri
LGTM https://codereview.appspot.com/7378061/diff/15001/src/cmd/vet/print.go File src/cmd/vet/print.go (right): https://codereview.appspot.com/7378061/diff/15001/src/cmd/vet/print.go#newcode80 src/cmd/vet/print.go:80: lit.Value = strconv.Quote(x + y) you are changing ...
12 years, 3 months ago (2013-02-23 19:29:39 UTC) #9
r
12 years, 3 months ago (2013-02-23 23:08:41 UTC) #10
*** Submitted as https://code.google.com/p/go/source/detail?r=8eb896294200 ***

cmd/vet: check argument types in printf formats
Fixes issue 4404.

R=gri, rsc
CC=golang-dev
https://codereview.appspot.com/7378061

https://codereview.appspot.com/7378061/diff/15001/src/cmd/vet/print.go
File src/cmd/vet/print.go (right):

https://codereview.appspot.com/7378061/diff/15001/src/cmd/vet/print.go#newcod...
src/cmd/vet/print.go:123: if err != nil {
On 2013/02/23 19:29:40, gri wrote:
> that should never happen if the parser returned no errors

Done.

https://codereview.appspot.com/7378061/diff/15001/src/cmd/vet/print.go#newcod...
src/cmd/vet/print.go:126: firstArg := formatIndex + 1
On 2013/02/23 19:29:40, gri wrote:
> add a comment?
> 
> // format arguments follow the format immediately

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b