389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
200 stars 82 forks source link

Compiler warnings #2929

Open 389-ds-bot opened 3 years ago

389-ds-bot commented 3 years ago

Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/49870


Issue Description

When compiling with strict CFLAGS, large number of warnings is produced.

Package Version and Platform

master

Steps to reproduce

  1. CFLAGS="-O2 -g -Wall -Wextra -Wundef -Wpointer-arith -Wfloat-equal -Wstrict-prototypes -Wstrict-overflow=5 -Wwrite-strings -Winit-self -Wuninitialized -Wno-sign-compare -Wshadow" ./configure
  2. make 2> build.err
389-ds-bot commented 3 years ago

Comment from vashirov (@vashirov) at 2018-07-25 14:29:08

err.tar.bz2

389-ds-bot commented 3 years ago

Comment from vashirov (@vashirov) at 2018-07-25 14:29:09

Metadata Update from @vashirov:

389-ds-bot commented 3 years ago

Comment from mreynolds (@mreynolds389) at 2019-02-07 17:30:36

Metadata Update from @mreynolds389:

389-ds-bot commented 3 years ago

Comment from mreynolds (@mreynolds389) at 2020-02-26 17:07:30

Metadata Update from @mreynolds389:

389-ds-bot commented 3 years ago

Comment from mreynolds (@mreynolds389) at 2020-01-30 17:44:43

might be duplicate of #3868

389-ds-bot commented 3 years ago

Comment from mreynolds (@mreynolds389) at 2020-01-30 17:44:43

Metadata Update from @mreynolds389:

389-ds-bot commented 3 years ago

Comment from mreynolds (@mreynolds389) at 2020-01-30 17:45:49

Metadata Update from @mreynolds389:

mreynolds389 commented 3 years ago

I started trying to fix this, but the discarded-qualifiers warnings are a can of worms. I fix 20 then it causes 100 additional warnings. Just a heads up...

Firstyear commented 3 years ago

@mreynolds389 You should have seen the 44 gallon drum of worms I hit with -Wshadow.

mreynolds389 commented 3 years ago

@mreynolds389 You should have seen the 44 gallon drum of worms I hit with -Wshadow.

I actually fixed most of the shadow warnings! :-o There are more warnings in the backend code, but since @progier389 has a big backend patch coming I will look at them later (don't want to cause any cherry-pick problems for him)

Firstyear commented 3 years ago

Nice mate! Maybe we should consider doing another clang format if we are in a cleanup again? That way we can do them more often, especially if we commit the clang format rules to the repo.