THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Git Source Code Mirror - This is a publish-only repository and all pull requests are ignored. Please follow Documentation/SubmittingPatches procedure for any of your improvements.
git
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.6KB

  1. ifeq ($(filter no-error,$(DEVOPTS)),)
  2. DEVELOPER_CFLAGS += -Werror
  3. endif
  4. ifneq ($(filter pedantic,$(DEVOPTS)),)
  5. DEVELOPER_CFLAGS += -pedantic
  6. # don't warn for each N_ use
  7. DEVELOPER_CFLAGS += -DUSE_PARENS_AROUND_GETTEXT_N=0
  8. endif
  9. DEVELOPER_CFLAGS += -Wall
  10. DEVELOPER_CFLAGS += -Wdeclaration-after-statement
  11. DEVELOPER_CFLAGS += -Wformat-security
  12. DEVELOPER_CFLAGS += -Wno-format-zero-length
  13. DEVELOPER_CFLAGS += -Wold-style-definition
  14. DEVELOPER_CFLAGS += -Woverflow
  15. DEVELOPER_CFLAGS += -Wpointer-arith
  16. DEVELOPER_CFLAGS += -Wstrict-prototypes
  17. DEVELOPER_CFLAGS += -Wunused
  18. DEVELOPER_CFLAGS += -Wvla
  19. ifndef COMPILER_FEATURES
  20. COMPILER_FEATURES := $(shell ./detect-compiler $(CC))
  21. endif
  22. ifneq ($(filter clang4,$(COMPILER_FEATURES)),)
  23. DEVELOPER_CFLAGS += -Wtautological-constant-out-of-range-compare
  24. endif
  25. ifneq ($(or $(filter gcc6,$(COMPILER_FEATURES)),$(filter clang4,$(COMPILER_FEATURES))),)
  26. DEVELOPER_CFLAGS += -Wextra
  27. # if a function is public, there should be a prototype and the right
  28. # header file should be included. If not, it should be static.
  29. DEVELOPER_CFLAGS += -Wmissing-prototypes
  30. ifeq ($(filter extra-all,$(DEVOPTS)),)
  31. # These are disabled because we have these all over the place.
  32. DEVELOPER_CFLAGS += -Wno-empty-body
  33. DEVELOPER_CFLAGS += -Wno-missing-field-initializers
  34. DEVELOPER_CFLAGS += -Wno-sign-compare
  35. DEVELOPER_CFLAGS += -Wno-unused-parameter
  36. endif
  37. endif
  38. # uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
  39. # not worth fixing since newer compilers correctly stop complaining
  40. ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
  41. ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
  42. DEVELOPER_CFLAGS += -Wno-uninitialized
  43. endif
  44. endif