LM358 (as comparator) output voltage less than supply voltage
LM358 is not a rail-to-rail output op-amp, so you should not expect it to produce an output near the positive supply voltage.

Unfortunately, the datasheet doesn't go out of its way to make this obvious. The main clues are:


Nowhere on the front page does it claim to have rail-to-rail outputs.
Figure 10 on page 10:


This shows that if only modest currents are sourced from the output, the maximum output voltage is about 1 V below the upper supply voltage.


Edit: You might also have some issues from not hooking up the second op-amp. It could potentially oscillate and affect the behavior of the op-amp you are using. The typical way to deal with this is simply hook it up as a follower with nothing connected to its output.