What are the consequences of ignoring: warning: unused parameter

前端 未结 8 819
闹比i
闹比i 2020-12-29 23:48

I am working on a C++ project and I noticed that we have a number of warnings about unused parameters.

What effect could it have if these warnings are ignored?

8条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-30 00:04

    None. except [EDIT]: as others have pointed out, You could have an unassigned output parameter.

    You should clean them up, because on many occasions I have seen developers ignore important warnings that were 'hidden' in amongst a large number of warnings, and they were so used to seeing warnings they never paid any attention to them. I try to have zero warnings at all times, and set compiler warnings to the maximum level.

提交回复
热议问题