I always try to say something even if it is just slightly off.
If they look at you funny for noticing a small error just tell them you used to work in retail and you know they have to count out their drawer at the end of the shift and explain any discrepancies. Then it sounds like you are just looking out for the cashier’s best interests. Chances are they will be VERY happy to have an understanding and non-judgemental customer catch their mistake. When I worked in retail we had to explain why our drawer total did not match the amount the register’s computer claimed the drawer had. It may be a small discrepancy for your transaction, but if the store clerk is making a regular error without realizing it, then it will add up by the end of his or her shift.
It sounds so cynical to say this, but if the clerk is not giving the right change or charging the wrong amounts they may be running a scam and skimming a bit off the top when it comes to the money in their drawer. There was an assistant manager at a store I used to work in that was stealing from the store and tweaking some drawer totals to hide if from people. A person may ring you up for the wrong amount or give back the wrong amount of change because they are systematically overcharging some and undercharging other customers to throw off the drawer and pocket the difference. I highly doubt your average store clerk is doing this when they ring you up incorrectly. 99% of the time I am sure it is just an honest mistake, but for that 1% out there it’s best to just mention the problem up front so they have to either do something about it or tell you not to worry. If they tell you not to worry about the difference, then the ball is in their court and any problems are completely their fault.