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

Closed
dlintw opened this issue Feb 28, 2012 · 2 comments
Milestone

Comments

@dlintw
Copy link

dlintw 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 github.com/mattn/go-sqlite3

What is the expected output?
remove such warning

What do you see instead?
gcc -I . -g -O2 -fPIC -m64 -pthread -I $WORK/github.com/mattn/go-sqlite3/_obj/ -o
$WORK/github.com/mattn/go-sqlite3/_obj/sqlite3.cgo2.o -c
$WORK/github.com/mattn/go-sqlite3/_obj/sqlite3.cgo2.c

# github.com/mattn/go-sqlite3
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)?
go

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.

mattn/go-sqlite3#8
As comment said, it occurs between Go version 9e53309dfa6d and 1c2e5d6d7660.
@dsymonds
Copy link
Contributor

Comment 2:

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

@rsc
Copy link
Contributor

rsc commented Mar 8, 2012

Comment 3:

This issue was closed by revision 43d71e7.

Status changed to Fixed.

@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.
Projects
None yet
Development

No branches or pull requests

4 participants