0009-gcc7.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Fix gcc7 compile
  2. mysql.cc: In function 'void build_completion_hash(bool, bool)':
  3. mysql.cc:2687:37: error: invalid conversion from 'char' to 'char*' [-fpermissive]
  4. field_names[i][num_fields*2]= '\0';
  5. ^~~~
  6. Patch was partly backported from upstream commit:
  7. https://github.com/mysql/mysql-server/commit/ae21683d980d5fe9e39bd0193827ea3604256eb9
  8. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  9. [Thomas: add more gcc 7.x fixes in instance_map.cc.]
  10. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  11. Index: b/client/mysql.cc
  12. ===================================================================
  13. --- a/client/mysql.cc
  14. +++ b/client/mysql.cc
  15. @@ -2684,7 +2684,7 @@
  16. mysql_free_result(fields);
  17. break;
  18. }
  19. - field_names[i][num_fields*2]= '\0';
  20. + field_names[i][num_fields*2]= NULL;
  21. j=0;
  22. while ((sql_field=mysql_fetch_field(fields)))
  23. {
  24. Index: b/server-tools/instance-manager/instance_map.cc
  25. ===================================================================
  26. --- a/server-tools/instance-manager/instance_map.cc
  27. +++ b/server-tools/instance-manager/instance_map.cc
  28. @@ -526,12 +526,12 @@
  29. Options::Main::config_file);
  30. argv_options[1]= defaults_file_arg;
  31. - argv_options[2]= '\0';
  32. + argv_options[2]= NULL;
  33. argc= 2;
  34. }
  35. else
  36. - argv_options[1]= '\0';
  37. + argv_options[1]= NULL;
  38. /*
  39. If the routine failed, we'll simply fallback to defaults in