Bug #1352 sparc / gcc 2.95.2 compile error

Submitted: 19 Sep 2003 13:12 Modified: 11 Dec 2003 9:26
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL++ Severity:S3 (Non-critical)
Version:1.7.9 OS:Solaris (Solaris)
Assigned to: CPU Architecture:Any

[19 Sep 2003 13:12] [ name withheld ]
Description:
Compile failed for mysql++ .. trivial complaint from gcc... complaint as follows:

/bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../sqlplusint  -I/u/user/app/mysql//include/mysql  -g -O2 -c connection.cc
rm -f .libs/connection.lo
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../sqlplusint -I/u/user/app/mysql//include/mysql -g -O2 -Wp,-MD,.deps/connection.pp -c  -fPIC -DPIC connection.cc -o .libs/connection.lo
connection.cc: In method `class string MysqlConnection::info()':
connection.cc:112: initialization to `char *' from `const char *' discards qualifiers

My system information is as follows:
$ uname -a
SunOS cpu08.student.cs 5.8 Generic_108528-23 sun4u sparc SUNW,UltraAX-i2
$ gcc --version
2.95.2
$ gmake --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.

How to repeat:
Run gmake with above compiler/system config

Suggested fix:
connection.cc:

112c112
<   char *i = mysql_info(&mysql);
---
>   const char *i = mysql_info(&mysql);
[11 Dec 2003 9:26] MySQL Verification Team
Fixes in current 1.8.0 development tree

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.