Once you get things cleaned up you submit a Reconsideration request to get the warning removed. It is important to note in the request that you are submitting because your site was hacked with a Pharma hack and is labeled with the compromised warning in search results. Note in the request that you have cleaned things up and secured your site and include a couple of example URLs that used to include the spam and are now clean.