Sensitivity analysis of optimal control problems for switched systems