SunPower Corp (NASDAQ:SPWR) on Wednesday posted a larger-than expected net profit for the second quarter of 2019, but said it expects to be back in the red in the third quarter.