First, as you can see your code is poorly formatted. When pasting code, use four spaces, or click the "Code sample" button when typing on this site.
Copy-and-paste from the web is not recommended. It can ruin formatting, including indentation, which is significant for GDScript. In addition, you learn more by typing the code yourself than by copy-and-paste.
What you quoted there is a warning, not an error. Nothing is wrong and there's nothing that needs to be "fixed".
I assume this is from the "Using KinematicBody2D" tutorial? To correct the warning, the code should be updated to read
velocity = move_and_slide(velocity)
In this way, the return value of the function is re-assigned to the velocity. It doesn't really matter for this example, because there is no wall collision happening, but it is technically more correct.
More generally, warnings are there to inform, not to force changes. If you understand what the warning means, and what it means to ignore it, then it can be disregarded. However, it is highlighting something that could result in an issue down the road.