@b4n commented on this pull request.


>  
                if (main_status.main_window_realized)
-                       dialogs_show_msgbox(GTK_MESSAGE_WARNING, warn_msg, 
display_filename);
+                       dialogs_show_msgbox(GTK_MESSAGE_WARNING, "%s", 
warn_msg);
+
+               ui_set_statusbar(TRUE, "%s", warn_msg);

> Maybe the format should be taken out of `ui_set_statusbar` and 
> `msgwin_status_add`

`ui_set_statusbar()` has many callers using the formatting feature, and I don't 
think it's worth adding a specific variant not taking a format but a plain 
string (quick grep gives me 12 out of 87 calls pass `"%s"` using this branch).
OTOH we have 
[`msgwin_status_add_string()`](https://github.com/geany/geany/blob/eef67ecc200a6cf07f277c28282facf9854cd2ea/src/msgwindow.h#L62),
 which I use in the patch.

> or the compiler told they are 
> [formats](https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Function-Attributes.html)
>  
> [and](https://releases.llvm.org/9.0.0/tools/clang/docs/AttributeReference.html#format).

What [do](https://docs.gtk.org/glib/func.GNUC_PRINTF.html) 
[you](https://github.com/geany/geany/blob/eef67ecc200a6cf07f277c28282facf9854cd2ea/src/ui_utils.h#L108)
 
[mean](https://github.com/geany/geany/blob/eef67ecc200a6cf07f277c28282facf9854cd2ea/src/msgwindow.h#L60)?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3665#discussion_r1376758367
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3665/review/[email protected]>

Reply via email to