Despite being widely seen as a polite gesture, flashing headlights to signal other drivers violates specific sections of the Highway Code, motorists have been warned.