Make sudo pass -Wwrite-strings

This commit is contained in:
Todd C. Miller
2022-06-28 16:33:15 -06:00
parent b3a8cad346
commit 13672f28df
77 changed files with 590 additions and 640 deletions

View File

@@ -848,7 +848,7 @@ fp_common:
convbuf = NULL;
}
if ((wcp = GETARG(wchar_t *)) == NULL) {
cp = "(null)";
cp = (char *)"(null)";
} else {
convbuf = __wcsconv(wcp, prec);
if (convbuf == NULL)
@@ -858,7 +858,7 @@ fp_common:
} else
#endif /* PRINTF_WIDE_CHAR */
if ((cp = GETARG(char *)) == NULL)
cp = "(null)";
cp = (char *)"(null)";
if (prec >= 0) {
/*
* can't use strlen; can only look for the
@@ -945,7 +945,7 @@ number: if ((dprec = prec) >= 0)
break;
default:
cp = "bug in vfprintf: bad base";
cp = (char *)"bug in xxxprintf: bad base";
size = strlen(cp);
goto skipsize;
}