Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Semantic Issue :- Unused Parameter error

I am getting this error:

I am getting this error

I have done the setting in Project in Build setting:

I have done the setting in Project in Build setting

I have done the setting in Target in Build setting:

I have done the setting in Target in Build setting

enter image description here

I have used the following solution

1) #pragma unused(parameterName), which is working

But the problem is, I have used too many file Where this error is coming, so I want to know if any common solution is available for this.

(*) any one can try the below steps to find this kind of error: sample-videochat-webrtc

  1. Create swift Project

  2. Add file, import and build then error will come

like image 345
Sumit singh Avatar asked May 24 '17 14:05

Sumit singh


1 Answers

OK, finally I was able to reproduce the issue on the sample project. This issue is a result of the fact that in the "sample-chat-swift" project among "Other Warning Flags" there is -Wextra flag (you can see it in project.pbxproj) which according to Diagnostic flags in Clang

Also controls -Wignored-qualifiers, -Winitializer-overrides, -Wmissing-field-initializers, -Wmissing-method-return-type, -Wsemicolon-before-method-body, -Wsign-compare, -Wunused-parameter.

And since the flags from "Other Warning Flags" are added after explicitly configured flags to the command line, -Wextra overrides -Wno-unused-parameter.

like image 188
SergGr Avatar answered Nov 07 '22 19:11

SergGr