Declare variable for string literal const

newgidmap.c:87:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   87 |         policy = "deny\n";
      |                ^
pull/487/head
Christian Göttsche 11 months ago
parent 119cee142e
commit a74114fe34
  1. 3
      src/newgidmap.c

@ -76,7 +76,8 @@ static void usage(void)
static void write_setgroups(int proc_dir_fd, bool allow_setgroups)
{
int setgroups_fd;
char *policy, policy_buffer[4096];
const char *policy;
char policy_buffer[4096];
/*
* Default is "deny", and any "allow" will out-rank a "deny". We don't

Loading…
Cancel
Save