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

cmd/cgo: shows expected ‘const char **’ but argument is of type ‘char **’ #3152

dlintw opened this issue Feb 28, 2012 · 2 comments


Copy link

commented Feb 28, 2012

cgo shows expected ‘const char **’ but argument is of type ‘char **’

What steps will reproduce the problem?
1.go get -x

What is the expected output?
remove such warning

What do you see instead?
gcc -I . -g -O2 -fPIC -m64 -pthread -I $WORK/ -o
$WORK/ -c

sqlite3.go: In function ‘_cgo_fe2086fd4234_Cfunc_sqlite3_prepare_v2’:
sqlite3.go:324 warning: passing argument 5 of ‘sqlite3_prepare_v2’ from incompatible
pointer type [enabled by default]
/usr/include/sqlite3.h:2924:16: note: expected ‘const char **’ but argument is of
type ‘char **’

Which compiler are you using (5g, 6g, 8g, gccgo)?

Which operating system are you using?
ArchLinux x86_64

Which revision are you using?  (hg identify)
go-hg version 1c2e5d6d7660
sqlite3 3.7.10-1
gcc (GCC) 4.6.2 20120120 (prerelease)

Please provide any additional information below.

As comment said, it occurs between Go version 9e53309dfa6d and 1c2e5d6d7660.

This comment has been minimized.

Copy link

commented Feb 29, 2012

Comment 2:

Labels changed: added priority-go1, cgo, removed priority-triage.


This comment has been minimized.

Copy link

commented Mar 8, 2012

Comment 3:

This issue was closed by revision 43d71e7.

Status changed to Fixed.

@dlintw dlintw added fixed labels Mar 8, 2012

@rsc rsc added this to the Go1 milestone Apr 10, 2015

@rsc rsc removed the priority-go1 label Apr 10, 2015

@golang golang locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
4 participants
You can’t perform that action at this time.