The warning tells you that you have a variable used only once in this predicate list clause (in this case, the second clause).
Why does he warn you about this? Because most often you mistakenly wrote the name of the variable. The resulting code when skipping a variable is also a valid prolog program, so debugging will be painful if it does not warn you.
If you are not going to use this variable (X), you can use an anonymous variable. To use an anonymous variable, you must use _ as a term instead of a variable name.
In your example, this would be:
list([]). list([_|L]) :- list(L).
gusbro
source share