Terms of the deal announced Sunday were not released.
Varejao averaged 2.6 points and 2.3 rebounds in 22 games after signing with the Warriors on Feb. 22. He began the season with Cleveland and averaged 2.6 points and 2.9 rebounds in 31 games before being dealt to Portland in a three-team trade on Feb. 18 and was subsequently waived by the Trail Blazers.
The 33-year-old Brazilian averaged 1.2 points and 1.2 rebounds in 17 playoff games for the Warriors.
For his career, Varejao has averaged 7.4 points and 7.3 rebounds in 613 games.