Most of the warnings generated are benign. Nevertheless, this can lead to: 1. Hiding of important warnings that have correctness implications when compiling with optimization flags 1. Many warnings are about discarding const, ignoring these will lead down the road to error-prone code to be compiled. 1. It discourages applying more stricter compilation flags, as it will lead to more of the same.

@antirez : I began to fix the const related warning, but I wonder if this is of interest to the community.

Comment From: tryfinally

I just noticed that I was compiling with my environment additional stricter warning flags.

Comment From: trevor211

What are the additional flags that you used?

Comment From: oranagra

@tryfinally i don't think we want to make redis compatible with -Wall or something a like, since i'm guessing it would produce too many false positives. But if while fixing these you noticed something that could actually be a bug, please make a PR for that.

Meanwhile, i'm closing this issue since i understand it was a mixup due to your specific environment and not that redis is built by default with warnings.

Comment From: tryfinally

@oranagra I was a bunch of other flags, most of them due to dicarding const. Which can lead to some code trying to write to const data and runtime crash. please advice on those. regarding others I will come back later and handle them via individual PRs.

Comment From: oranagra

@tryfinally the const warnings are probably not interesting, i don't imagine any of these can lead to a bug in redis. if any of the others are a real bug, please issue a PR. but if they're just cleanup, i wouldn't change many lines to solve warnings that we never get. unless they show as warnings in a default build (e.g. sometimes happens when switching to a new compiler)