• Sergey Vojtovich's avatar
    MDEV-9988 - Insert cast to suppress -Wdynamic-class-memaccess · 94bad73d
    Sergey Vojtovich authored
    Clang warns on this code because it is memsetting over a vtable contained in a
    struct in the best_positions array. The diagnostic text is:
    
    mariadb/sql/sql_select.cc:24462:10: error: destination for this 'memset' call is
    a pointer to class containing a dynamic class 'Duplicate_weedout_picker'; vtable
    pointer will be overwritten [-Werror,-Wdynamic-class-memaccess]
      memset(best_positions, 0, sizeof(POSITION) * (table_count + 1));
      ~~~~~~ ^
    
    Patch contributed by David Gow.
    94bad73d
sql_select.cc 819 KB