A ball above head height of an upright standing striker is by definition unfair. But if a batsman hits that ball, is it still a no ball, and is the bowler warned for a dangerous delivery?
The laws state in law 41.6 and 41.7 define dangerous short pitched (bouncers) and dangerous full pitched (beamers) deliveries.
In addition Law 21.10 specifies that a delivery passing above head height is a no ball. Note this is the laws of cricket, the international playing conditions change that to be a wide.
So to answer your question, if it's a bouncer and it passes above head height it's a no ball, and the umpire would consider whether to warn the bowler based on whether it was dangerous, if he/she considers it as such they will go through the warning process. Whether the batsman hit it would be of limited consideration.
For a beamer it would automatically be a no ball as all such deliveries are. Then the decision on a warning is based upon whether the ball was dangerous. If it's considered dangerous the warning process would be followed. Again regardless of whether the batsmen hit it.
In terms of danger for a beamer, we have been asked in the league I umpire in to consider any ball that would have hit the batsmen to be dangerous.