Goldman Sachs' strong second-quarter earnings were a result of basic blocking and tackling for the firm, the Wall Street bank's chief financial officer said on Tuesday.

In a quarter in which Goldman reported a 33 percent rise in earnings, David Viniar said the company focused on its core businesses, without ramping up risk.

We did well across a variety of businesses, Viniar said on a conference call with journalists. It was very well spread, across equities and underwriting.

He said Goldman's risk portfolio was essentially flat in the quarter, calling it vanilla in terms of fears about the bank engaging in too much risk so soon after last year's credit crisis.

Viniar said Goldman benefited from the disappearance of some of its competitors in the investment banking business.

There is definitely less competition out there, he said, adding that there is also less risk capital available.

Goldman set aside $6.65 billion for compensation in the quarter, at a time when banks are under political pressure to curb lavish bonuses.

Viniar said the compensation figures are strong for the first half of the year but will suffer if the company falters in the second half.

According to its quarterly report, Goldman lost 400 people, or about 1 percent of its staff, in the second quarter. Viniar said head count was likely to rise in the third quarter.

If anything, we are seeing an influx of talent, he said.

He declined to discuss the specifics of the alleged theft of Goldman computer codes by a former employee, but called any losses immaterial and said Goldman still has the codes.