Wal-Mart has reported sluggish figures for the second quarter, but has managed to post a slight profit.