US retail giant Wal-Mart has posted a rise in quarterly earnings, as an improved performance by its Sam's Club warehouse unit and rapid international expansion helped to offset weaker sales at its US discount unit.