mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 14:58:09 +02:00
cli: don't print warnings when completing arguments
$ nmcli con add type wifi ifname wlan0 \
wifi-sec.key-mgmt none \
wifi-sec.wep-key0 $ascii_key \
ssid <TAB>
completes the line with:
"Info:\ WEP\ key\ is\ guessed\ to\ be\ of\ '2\ \(passphrase\)'"
The environment warning function should not emit warning when
completing arguments.
This commit is contained in:
parent
6f5f1b2d29
commit
5e239d2c04
1 changed files with 4 additions and 0 deletions
|
|
@ -371,8 +371,12 @@ _env_warn_fcn_handle (const NMMetaEnvironment *environment,
|
||||||
const char *fmt_l10n, /* the untranslated format string, but it is marked for translation using N_(). */
|
const char *fmt_l10n, /* the untranslated format string, but it is marked for translation using N_(). */
|
||||||
va_list ap)
|
va_list ap)
|
||||||
{
|
{
|
||||||
|
NmCli *nmc = environment_user_data;
|
||||||
gs_free char *m = NULL;
|
gs_free char *m = NULL;
|
||||||
|
|
||||||
|
if (nmc->complete)
|
||||||
|
return;
|
||||||
|
|
||||||
NM_PRAGMA_WARNING_DISABLE("-Wformat-nonliteral")
|
NM_PRAGMA_WARNING_DISABLE("-Wformat-nonliteral")
|
||||||
m = g_strdup_vprintf (_(fmt_l10n), ap);
|
m = g_strdup_vprintf (_(fmt_l10n), ap);
|
||||||
NM_PRAGMA_WARNING_REENABLE
|
NM_PRAGMA_WARNING_REENABLE
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue