[MDEV-32243] Make older compilers happy with log.h Created: 2023-09-25  Updated: 2023-09-30  Resolved: 2023-09-30

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 11.2
Fix Version/s: 11.2.2

Type: Bug Priority: Critical
Reporter: Alexey Botchkov Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: None
Environment:

gcc version 4.9.0



 Description   

Compilation fails producing errors like

/home/hf/wgit/mdev-22168-1103/sql/log.h: In constructor ‘Cache_flip_event_log::Cache_flip_event_log()’:
/home/hf/wgit/mdev-22168-1103/sql/log.h:453:74: error: missing initializer for member ‘st_io_cache::pos_in_file’ [-Werror=missing-field-initializers]
                            current(&log_file), alt(&alt_buf), ref_count(1) {}

It's a known and fixed compiler issue
But i think it worth adapting for these compilers, also explicitly clear the buffer with the
my_b_clear() is faster and readable.



 Comments   
Comment by Alexey Botchkov [ 2023-09-25 ]

https://github.com/MariaDB/server/commit/daca468c682ede3b423359b4d835dcbe3d6251a8

Comment by Sergei Golubchik [ 2023-09-25 ]

ok to push

Generated at Thu Feb 08 10:29:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.