[MDEV-10322] build error: jdbconn.cpp:273:11: error: assigning to 'char *' from incompatible type 'const char *' Created: 2016-07-01  Updated: 2016-07-18  Resolved: 2016-07-02

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Storage Engine - Connect
Affects Version/s: 10.1.15
Fix Version/s: 10.1.16, 10.0.27

Type: Bug Priority: Major
Reporter: Dan Assignee: Olivier Bertrand
Resolution: Fixed Votes: 0
Labels: clang
Environment:

Mac OS X 10.11.5/10.12, Homebrew, Xcode 7.3.1/8.0.0



 Description   

Hello, compilation fails with clang:

$ clang --version
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin16.0.0
Thread model: posix

The relevant error message:

/tmp/mariadb-20160701-19427-idrvds/mariadb-10.1.15/storage/connect/jdbconn.cpp:273:11: error: assigning to 'char *' from incompatible type 'const char *'
        cap->Pat = (colpat && *colpat) ? colpat : "%";
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [storage/connect/CMakeFiles/connect.dir/jdbconn.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Thanks.



 Comments   
Comment by Olivier Bertrand [ 2016-07-02 ]

Fixed by replacing this line by:

cap->Pat = (colpat && *colpat) ? colpat : PlugDup(g, "%");

Comment by Dan [ 2016-07-10 ]

Thanks, but please note that this error affects also version 10.2.1.

Comment by Olivier Bertrand [ 2016-07-10 ]

Normally, fixes from version 10.0 and 10.1 are automatically ported to 10.2 and will be available with next version.

Comment by Dan [ 2016-07-18 ]

Sorry, this doesn't seem to be fixed in 10.1.16. Here is part of the build log.

/tmp/mariadb-20160718-3129-9lm27i/mariadb-10.1.16/storage/connect/jdbconn.cpp:273:11: error: assigning to 'char *' from incompatible type 'const char *'
        cap->Pat = (colpat && *colpat) ? colpat : "%";
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [storage/connect/CMakeFiles/connect.dir/jdbconn.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Comment by Olivier Bertrand [ 2016-07-18 ]

Exact. It seems that version 10.1.16 was released without including the last version of Connect I pushed on the Connect site.

Generated at Thu Feb 08 07:41:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.