The chance of damage is nil. Diesels are so tightly regulated now for emissions that even a transient fault that clears immediately has to be manually reset. Thus making dealers lots and lots of extra cash.
You only need to turn the key to the on position while the airflow sensor is disconnected, for example, for a fault to be recorded. Reconnecting the sensor and turning off and on again is no longer enough :-(