Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#1154 closed defect/bug (fixed)

Fix all compiler warnings

Reported by: sleske Owned by: KaZeR
Priority: critical Milestone: version 0.5.1
Component: core Version: git master
Severity: Keywords: build, make, compile, warning, quality
Cc: cp15

Description

The Navit build activates compiler warnings (flag -Wall). This is good :-).

However, what's not so good is that apparently no one reads and fixes them, which makes them rather pointless. For example, the current nightly build on Ubuntu produces about 180 (!) warnings.

This should be fixed, so if code changes cause a warning, it will stand out and get attention.

Change History (12)

comment:1 Changed 5 years ago by sleske

I'm working on this. I'm already more than halfway there... commits coming soon.

comment:2 follow-up: Changed 5 years ago by usul

  • Cc cp15 added
  • Keywords build make compile warning quality added
  • Milestone changed from version 0.5.0 to version 0.5.1

Can you please post some logs or describe what are the most problems?

I just have not the skill to do such improvements currently, but I'm very interested to learn :)

As 0.5.1 will focus on cleaning up our build environment, this is IMHO heavy related to that one.

comment:3 in reply to: ↑ 2 Changed 5 years ago by sleske

Replying to http://wiki.navit-project.org/index.php/user:usul:

Can you please post some logs or describe what are the most problems?

I'll commit my changes soon. If looking at the changes and comments is not enough, feel free to ask here, or in the forum.

comment:4 Changed 5 years ago by sleske

  • Resolution set to fixed
  • Status changed from new to closed

Fixes committed in rev.5563 to rev.5574.

Now Navit builds without warnings under -Wall.

Next: see what happens if -Wextra is enabled...

comment:5 Changed 5 years ago by tryagain

  • Priority changed from major to critical
  • Resolution fixed deleted
  • Status changed from closed to reopened

I'm reopening the ticket as it looks like the changes applied have broken builds on some platforms, see http://download.navit-project.org/logs/navit/stats.html for details.

comment:6 Changed 5 years ago by sleske

Oh sorry, didn't know that. Thanks for the information, I'll have a look.

BTW, I didn't even know that page, nice overview.

comment:7 Changed 5 years ago by usul

This is why I suggested a more common build server approach as Jenkins to get better feedback to devs. Anyway this is currently overpowering our team.

Thank you very much for your work on cleaning up the code :)

comment:8 Changed 5 years ago by sleske

I just committed rev. 5576, which partially reverts 5571. This should fix this problem.

I hope there aren't more problems hiding behind the first one...

comment:9 Changed 5 years ago by sleske

Ok, builds are green again :-). Now I'll figure out how to properly fix the code I reverted.

comment:10 Changed 5 years ago by usul

Just for completeness, there is a discussion on this topic at the forums: https://forum.navit-project.org/viewtopic.php?f=19&t=435&p=610

comment:11 Changed 5 years ago by sleske

  • Resolution set to fixed
  • Status changed from reopened to closed

With rev.5577 to rev.5583 this should now be fixed properly.

We still build without warnings, and builds are still green, so I'm closing this ticket.

Coming up next: Enable -Wextra...

comment:12 Changed 5 years ago by tryagain

It looks like win32 cmake builds are broken since r5588 as compiler used does not accept new option -Wno-missing-field-initializers

[update] It looks like cp15 has fixed it with r5617.

Last edited 5 years ago by tryagain (previous) (diff)
Note: See TracTickets for help on using tickets.