piss in the wind
Doing something that is a complete waste of effort and time for which you can expect no results and may even backfire on you.
Telling the president that invading other countries is unpopular with many voters is like pissing in the wind.