Consider the adjacent diagram. As the block M is at rest.
Hence, f=frictionless force=mg sin `theta`
The force of frictionless acting between the block and incline opposes the tendency of sliding of the block. Since, block is not in motion, therefore no work is done by the force of friction. Hence, no dissipation of energy takes place.