Only create 'warning' field if there is a warning; reduces storage requirements