From owner-freebsd-ports-bugs@freebsd.org Tue Apr 3 08:26:16 2018 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94880F6B24A for ; Tue, 3 Apr 2018 08:26:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C5BD6DBB4 for ; Tue, 3 Apr 2018 08:26:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 3E2BD17802 for ; Tue, 3 Apr 2018 08:26:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w338QF5m053442 for ; Tue, 3 Apr 2018 08:26:15 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w338QFeJ053441 for freebsd-ports-bugs@FreeBSD.org; Tue, 3 Apr 2018 08:26:15 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 227244] databases/mariadb102-server: Fix build with clang 6 Date: Tue, 03 Apr 2018 08:26:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: brnrd@freebsd.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2018 08:26:16 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227244 Bug ID: 227244 Summary: databases/mariadb102-server: Fix build with clang 6 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: brnrd@freebsd.org Reporter: dim@FreeBSD.org Flags: maintainer-feedback?(brnrd@freebsd.org) Assignee: brnrd@freebsd.org Created attachment 192159 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D192159&action= =3Dedit Return 0 instead of NULL to fix build with clang 6 and higher When building with clang 6, which defaults to -std=3Dgnu++14 for C++ mode, databases/mariadb102-server fails to build, with the following errors: [ 48%] Building CXX object storage/connect/CMakeFiles/connect.dir/tabjson.c= pp.o cd /wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/storage= /connect && /usr/bin/c++ -DFORCE_INIT_OF_VARS -DGZ_SUPPORT -DHAVE_CONFIG_H -DHUGE_SUPPORT -DLIBXML2_SUPPORT -DLINUX -DMARIADB -DMYSQL_DYNAMIC_PLUGIN -DNOCRYPT -DODBC_SUPPORT -DUBUNTU -DUNIX -DVCT_SUPPORT -DXMAP -DZIP_SUPPORT -Dconnect_EXPORTS -I/wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/inclu= de -I/wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/sql -I/wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/pcre -I/usr/local/include -I/usr/local/include/libxml2 -O2 -pipe -march=3Dhaswell -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -Wl,-z,relro,-z,now -fstack-protector --param=3Dssp-buffer-size=3D4 -DWITH_INNODB_DISALLOW_WRITES -fno-rtti -Wall -Wmissing-declarations -Wno-unused-function -Wno-unused-variable -Wno-unused-value -Wno-parentheses -Wno-strict-aliasing -Wno-implicit-fallthrough -fpermissive -fexceptions -fPIC -O2 -pipe -march=3Dhaswell -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -D_FORTIFY_SOURCE=3D2 -DDBUG_OFF -fPIC -o CMakeFiles/connect.dir/tabjson.cpp.o -c /wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/storage= /connect/tabjson.cpp c++: warning: -Wl,-z,relro,-z,now: 'linker' input unused [-Wunused-command-line-argument] /wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/storage= /connect/tabjson.cpp:198:10: error: cannot initialize return object of type 'int' with an rvalue of type 'nullptr_t' return NULL; ^~~~ /usr/include/sys/_null.h:35:14: note: expanded from macro 'NULL' #define NULL nullptr ^~~~~~~ /wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/storage= /connect/tabjson.cpp:246:11: error: cannot initialize return object of type 'int' with an rvalue of type 'nullptr_t' return NULL; ^~~~ /usr/include/sys/_null.h:35:14: note: expanded from macro 'NULL' #define NULL nullptr ^~~~~~~ /wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/storage= /connect/tabjson.cpp:253:12: error: cannot initialize return object of type 'int' with an rvalue of type 'nullptr_t' return NULL; ^~~~ /usr/include/sys/_null.h:35:14: note: expanded from macro 'NULL' #define NULL nullptr ^~~~~~~ /wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/storage= /connect/tabjson.cpp:272:12: error: cannot initialize return object of type 'int' with an rvalue of type 'nullptr_t' return NULL; ^~~~ /usr/include/sys/_null.h:35:14: note: expanded from macro 'NULL' #define NULL nullptr ^~~~~~~ /wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/storage= /connect/tabjson.cpp:279:12: error: cannot initialize return object of type 'int' with an rvalue of type 'nullptr_t' return NULL; ^~~~ /usr/include/sys/_null.h:35:14: note: expanded from macro 'NULL' #define NULL nullptr ^~~~~~~ /wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/storage= /connect/tabjson.cpp:288:12: error: cannot initialize return object of type 'int' with an rvalue of type 'nullptr_t' return NULL; ^~~~ /usr/include/sys/_null.h:35:14: note: expanded from macro 'NULL' #define NULL nullptr ^~~~~~~ /wrkdirs/usr/ports/databases/mariadb102-server/work/mariadb-10.2.14/storage= /connect/tabjson.cpp:307:11: error: cannot initialize return object of type 'int' with an rvalue of type 'nullptr_t' return NULL; ^~~~ /usr/include/sys/_null.h:35:14: note: expanded from macro 'NULL' #define NULL nullptr ^~~~~~~ 7 errors generated. In this case, NULL is not suitable as a return value for a function returni= ng int. (Before C++11, NULL was usually defined as plain zero, which is why t= his bad code used to compile.) Fix it by returning integer zero instead, like in most other places in the = same function. --=20 You are receiving this mail because: You are the assignee for the bug.=