Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-3950

gcc-8 compilation warnings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 5.7.21-20, 5.6.39-83.1, 5.5.59-38.11
    • Component/s: None
    • Labels:
      None

      Description

      gcc-8 throws many new compilation warnings

      In file included from /github/inikep-ps/storage/federated/ha_federated.cc:378:
      /github/inikep-ps/sql/sql_analyse.h: In constructor ‘field_str::field_str(Item*, analyse*)’:
      /github/inikep-ps/sql/sql_analyse.h:124:53: error: cast between incompatible function types from ‘void (*)(String*)’ to ‘tree_element_free’ {aka ‘void (*)(void*, TREE_FREE, void*)’} [-Werror=cast-function-type]
         0, (tree_element_free)free_string, NULL); };
      
      In file included from /github/inikep-ps/sql/sql_plugin.h:32,
                       from /github/inikep-ps/sql/structs.h:23,
                       from /github/inikep-ps/sql/unireg.h:167,
                       from /github/inikep-ps/sql/sql_base.h:19,
                       from /github/inikep-ps/sql/sql_base.cc:19:
      /github/inikep-ps/sql/sql_base.cc: In function ‘bool close_cached_connection_tables(THD*, LEX_STRING*)’:
      /github/inikep-ps/include/m_string.h:66:49: error: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct TABLE_LIST’ with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess]
       # define bzero(A,B)             memset((A),0,(B))
                                                       ^
      /github/inikep-ps/sql/sql_base.cc:1196:3: note: in expansion of macro ‘bzero’
         bzero(&tmp, sizeof(TABLE_LIST));
      
      /github/inikep-ps/client/mysql_plugin.c: In function ‘get_default_values’:
      /github/inikep-ps/client/mysql_plugin.c:352:17: error: ‘ mysqld > ’ directive output may be truncated writing 10 bytes into a region of size between 1 and 512 [-Werror=format-truncation=]
                    "%s mysqld > %s", (char*)tool_path, (char*)defaults_file);
                       ^~~~~~~~~~
      In file included from /usr/include/stdio.h:936,
                       from /github/inikep-ps/include/my_global.h:323,
                       from /github/inikep-ps/include/m_string.h:25,
                       from /github/inikep-ps/client/mysql_plugin.c:18:
      /usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 11 and 1033 bytes into a destination of size 512
         return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              __bos (__s), __fmt, __va_arg_pack ());
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                przemyslaw.skibinski Przemyslaw Skibinski
                Reporter:
                przemyslaw.skibinski Przemyslaw Skibinski
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Time Spent - 3 days, 7 hours, 27 minutes Remaining Estimate - 2 days, 3 hours, 17 minutes
                  2d 3h 17m
                  Logged:
                  Time Spent - 3 days, 7 hours, 27 minutes Remaining Estimate - 2 days, 3 hours, 17 minutes
                  3d 7h 27m