[MDEV-19638] GCC compiler warnings Created: 2019-05-30  Updated: 2020-02-17  Resolved: 2020-02-17

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.4.5
Fix Version/s: 10.5.0

Type: Bug Priority: Minor
Reporter: Noel Kuntze Assignee: Robert Bindar
Resolution: Fixed Votes: 0
Labels: None
Environment:

GCC8


Attachments: HTML File errors    

 Description   

Hello,

GCC generates warnings about many different problems:
E.g.

  • truncated output
  • misleading indentation
  • unsed variables
  • dangling else
  • unused functions
  • differences between pointer signedness
  • Weirdly constructed for loop headers. E.g. for (i = 0, pcrp = &qrp->Colresp; crp = *pcrp; )

I attached the output of GCC on stderr.

Please let me know if and how you want to handle that. Some warnings like the dangling else and misleading indentation can be the cause of bugs or problems with debugging later. Truncated output is only mildly concerning.

On a side note, I put together a rather large patch set that changes the handling of the cflags and cxxflags in the CMake configuration files to make sure invalid options for the compiler aren't passed. E.g. GCC exclusive options passed to G++ and vice versa.

Kind regards

Noel Kuntze



 Comments   
Comment by Noel Kuntze [ 2019-06-04 ]

PR 1320 on GH (https://github.com/MariaDB/server/pull/1320)

Comment by Anel Husakovic [ 2020-02-17 ]

Pushed to 10.5 with 46553c2508.

Generated at Thu Feb 08 08:53:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.