[repartition]
fix "unused variable" warnings by proper use of #ifdef