DETROIT — General Motors on Wednesday posted second-quarter net income of $2.8 billion (all figures in USD), largely on strong North America results, and said the rest of the year would be more profitable than previously expected even as the global microchip shortage continues to hamper production.