Unused Element warning is issued in the following situation:
Parameter '<parameter>' is never used in query '<query>'
You have a Query Parameter that is not being used in your query.
Check whether the queryparameter is really necessary. If not, delete it from your SQL query.
Double-click on the error line to take you directly to the unused action in the module tree.