The latest mariadb update added ER_UNKNOWN_ERROR_CODE which causes an
warning in databases/ruby-mariadb. -Wint-conversion will become an error
in llvm15, so if this port is still useful and we want to keep it, this
should be fixed.

Three solutions come to mind, but I did not manage to figure out 1 and 2
within 5 minutes, so I leave that to someone with the requisite minimal
ruby skills:

1. Fix: don't add ER_UNKNOWN_ERROR_CODE to error_syms[] in 
ext/mysql_api/extconf.rb
2. Workaround: pass -Wno-int-conversion via CFLAGS somehow
3. Fix: remove the port unless it is still useful.

There's been no updates within nearly a decade, HOMEPAGE is dead and all
commits since 2014 were keeping this port on life support. Perhaps
ruby-mysql2 has taken over and there's no longer any need for this?

Here's the error with llvm15:

In file included from mysql.c:2277:
./error_const.h:3:27: error: incompatible pointer to integer conversion passing 
'const char[37]' to
parameter of type 'int' [-Wint-conversion]
    rb_define_mysql_const(ER_UNKNOWN_ERROR_CODE);
                          ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/mysql/errmsg.h:40:31: note: expanded from macro 
'ER_UNKNOWN_ERROR_CODE'
#define ER_UNKNOWN_ERROR_CODE "Unknown or undefined error code (%d)"
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to