The hazard warning lights should always be used when you stop on or near a roadway in an emergency.

The hazard warning lights warn other drivers that your vehicle is a traffic hazard and that they must take extreme caution when near it.

Depress the hazard warning flasher and all the turn signals will flash. The hazard warning indicator lights in the instrument cluster flash simultaneously.
NOTE
Horn
HomeLink Wireless Control System (Some models)Mazda 6 Owners Manual: Supplemental Restraint System Components
(With Front Passenger Occupant Classification System)
(Without Front Passenger Occupant Classification System)
Driver/Front passenger inflators and air bags
Roll-over sensor (some models), crash sensors, and diagnostic module (SAS
unit).
Seat belt pretensioners
Front air bag sensor ...
Mazda 6 Owners Manual: Cargo compartment light switch inspection
1. Remove the liftgate lower trim. (See LIFTGATE LOWER TRIM
REMOVAL/INSTALLATION)
2. Disconnect the cargo compartment light switch connector.
3. Inspect for continuity between the cargo compartment light switch
terminals using an ohmmeter.
If not as specified, replace the liftgate lock.
...