Project

General

Profile

Actions

Cleanup #9756

open

Issues found by Clang

Added by Daniel Hofmann over 9 years ago. Updated over 8 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

I again [1] used Clang with -Weverything [2] to compile the Ceph repository [3].
There is still a huge amount of serious issues reported by Clang.
Even new ones that were only found by the nightly Clang version I used.

-Wtautological-constant-out-of-range-compare:

-Wembedded-directive:

-Wvarargs:

-Wuninitialized:

There is even more, such as Wshift-sign-overflow, Wsign-compare, etc. that are just too many to list here. And I discovered those just with Clang's warnings -- this is not even using the Static Analyzer, which warns about various other issues I do not have the time to go through.

Could you please not only fix those issues but also incorporate Clang / Static Analyzer into your toolchain? I'm not heavily involved in Ceph's codebase as I'm mostly a user that compiles the repo every other month mostly for the fun of it.

Thanks,
Daniel

[1] http://thread.gmane.org/gmane.comp.file-systems.ceph.devel/19507
[2] clang version 3.6.0-svn219050-1~exp1 (trunk) (based on LLVM 3.6.0)
[3] https://github.com/ceph/ceph/tree/158381e95d14e05e187b025c73522cbec42e88b4

Actions #1

Updated by Sage Weil over 9 years ago

start with

https://github.com/ceph/autobuild-ceph/blob/master/build-ceph.sh

and make a build-ceph-clang.sh. then update build-auto.sh to have a clang case (in the hostname) and then it will be pretty trivial to add this to the gitbuilder list at

http://ceph.com/gitbuilders.cgi

of course, the real work is in cleaning up all the existing issues!

Actions #2

Updated by Nathan Cutler over 8 years ago

  • Status changed from New to In Progress

https://github.com/ceph/ceph/pull/6090 attempts to fix the -Wtautological-constant-out-of-range-compare

Actions #3

Updated by Kefu Chai over 8 years ago

Actions #4

Updated by Nathan Cutler over 8 years ago

Subtask for -Wtautological-constant-out-of-range-compare is #13424, hammer backport is #13425.

Actions

Also available in: Atom PDF