- m.category = MSG_C_GENERAL;
- m.severity = MSG_S_WARNING;
- m.file_name = NULL;
- m.first_line = 0;
- m.last_line = 0;
- m.first_column = 0;
- m.last_column = 0;
- m.text = ds_cstr (&text);
-
- msg_emit (&m);
+ struct msg *m = xmalloc (sizeof *m);
+ *m = (struct msg) {
+ .category = MSG_C_GENERAL,
+ .severity = MSG_S_WARNING,
+ .text = ds_steal_cstr (&text),
+ };
+ msg_emit (m);