Same happened with me!!
Same warning pop up in my HTC one too
I used the original data cable which i got with my htc one,used nokia's orignal data cable but it didn't solved the problem then i tried with an LG charger & now the charging speed is better & i am not getting that error anymore...