maint: syntax-check requires "char const *", not "const char *"

* gl/lib/mbsalign.c (mbs_align_pad): Adjust.
* src/chroot.c (is_root): Adjust.
* src/digest.c (main): Adjust.
* src/relpath.c (buffer_or_output) Adjust.
* src/ls.c (print_name_with_quoting, get_color_indicator): Adjust.
This commit is contained in:
Jim Meyering committed 2021-12-20 12:50:08 -08:00
1 parent 1cfbd4548d
commit eb2400fb9f
5 files changed
+11 -11

No files matched your search

+1 -1
View File
@@ -83,7 +83,7 @@ wc_truncate (wchar_t *wc, size_t width)
A pointer to the terminating NUL is returned. */
static char *
mbs_align_pad (char *dest, const char *dest_end, size_t n_spaces)
mbs_align_pad (char *dest, char const *dest_end, size_t n_spaces)
{
/* FIXME: Should we pad with "figure space" (\u2007)
if non ascii data present? */
+1 -1
View File
@@ -169,7 +169,7 @@ parse_additional_groups (char const *groups, GETGROUPS_T **pgids,
could be bind mounted to a separate location. */
static bool
is_root (const char *dir)
is_root (char const *dir)
{
char *resolved = canonicalize_file_name (dir);
bool is_res_root = resolved && STREQ ("/", resolved);
+6 -6
View File
@@ -1270,15 +1270,15 @@ main (int argc, char **argv)
setvbuf (stdout, NULL, _IOLBF, 0);
#if HASH_ALGO_SUM
const char *short_opts = "rs";
char const *short_opts = "rs";
#elif HASH_ALGO_CKSUM
const char *short_opts = "a:l:bctwz";
const char *digest_length_str = "";
char const *short_opts = "a:l:bctwz";
char const *digest_length_str = "";
#elif HASH_ALGO_BLAKE2
const char *short_opts = "l:bctwz";
const char *digest_length_str = "";
char const *short_opts = "l:bctwz";
char const *digest_length_str = "";
#else
const char *short_opts = "bctwz";
char const *short_opts = "bctwz";
#endif
while ((opt = getopt_long (argc, argv, short_opts, long_options, NULL)) != -1)
+2 -2
View File
@@ -4809,7 +4809,7 @@ print_name_with_quoting (const struct fileinfo *f,
struct obstack *stack,
size_t start_col)
{
const char *name = symlink_target ? f->linkname : f->name;
char const *name = symlink_target ? f->linkname : f->name;
const struct bin_str *color = print_with_color ?
get_color_indicator (f, symlink_target) : NULL;
@@ -4953,7 +4953,7 @@ get_color_indicator (const struct fileinfo *f, bool symlink_target)
struct color_ext_type *ext; /* Color extension */
size_t len; /* Length of name */
const char *name;
char const *name;
mode_t mode;
int linkok;
if (symlink_target)
+1 -1
View File
@@ -64,7 +64,7 @@ path_common_prefix (char const *path1, char const *path2)
and adjust *PLEN to reflect the remaining space.
Return TRUE on failure. */
static bool
buffer_or_output (const char *str, char **pbuf, size_t *plen)
buffer_or_output (char const *str, char **pbuf, size_t *plen)
{
if (*pbuf)
{