My dog whines all day, for no reason at all. If I take him outside, feed him, water him, or give him attention, he continues to whine. What can I do to stop this?

He is an old dog. We got him a few years ago at the humane society. I take him out and feed him and give him attention as much as he needs, and honestly, he's a bit fat because of it.