Action-camera maker GoPro Inc posted a smaller second-quarter loss on Thursday, helped by aggressive cost cuts and demand for its newer Hero cameras.