Fix -Werror=duplicate-decl-specifier compilation issues
capability.c:82:28: error: duplicate "const" declaration specifier capability.c:110:33: error: duplicate "const" declaration specifier rt_tgsigqueueinfo.c:42:61: error: duplicate "const" declaration specifier utime.c:66:23: error: duplicate "const" declaration specifier waitid.c:147:20: error: duplicate "const" declaration specifier * capability.c (cap_user_header_t, cap_user_data_t): Remove. (get_cap_header): Change return type to "const struct user_cap_header_struct *". (print_cap_header, print_cap_data): Change the type of last argument to "const struct user_cap_header_struct * const". (SYS_FUNC(capget)): Change type of "h" variable to "const struct user_cap_header_struct *". (SYS_FUNC(capset)): Change type of "h" variable to "const struct user_cap_header_struct * const". * tests/rt_tgsigqueueinfo.c (k_tgsigqueueinfo): Change the type of last argument to "const void *const". * tests/utime.c (main): Change the type of "tail_u" variable to "const struct utimbuf *const". * tests/waitid.c (do_waitid): Change the type of 3rd argument to "const siginfo_t *const".
This commit is contained in:
parent
c10dd66fb7
commit
2063341fef
19
capability.c
19
capability.c
@ -52,18 +52,18 @@ enum {
|
||||
|
||||
#include "xlat/cap_version.h"
|
||||
|
||||
typedef struct user_cap_header_struct {
|
||||
struct user_cap_header_struct {
|
||||
uint32_t version;
|
||||
int pid;
|
||||
} *cap_user_header_t;
|
||||
};
|
||||
|
||||
typedef struct user_cap_data_struct {
|
||||
struct user_cap_data_struct {
|
||||
uint32_t effective;
|
||||
uint32_t permitted;
|
||||
uint32_t inheritable;
|
||||
} *cap_user_data_t;
|
||||
};
|
||||
|
||||
static cap_user_header_t
|
||||
static const struct user_cap_header_struct *
|
||||
get_cap_header(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
{
|
||||
static struct user_cap_header_struct header;
|
||||
@ -79,7 +79,7 @@ get_cap_header(struct tcb *const tcp, const kernel_ulong_t addr)
|
||||
|
||||
static void
|
||||
print_cap_header(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const cap_user_header_t const h)
|
||||
const struct user_cap_header_struct *const h)
|
||||
{
|
||||
if (!addr || !h) {
|
||||
printaddr(addr);
|
||||
@ -107,7 +107,7 @@ print_cap_bits(const uint32_t lo, const uint32_t hi)
|
||||
|
||||
static void
|
||||
print_cap_data(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
const cap_user_header_t const h)
|
||||
const struct user_cap_header_struct *const h)
|
||||
{
|
||||
struct user_cap_data_struct data[2];
|
||||
unsigned int len;
|
||||
@ -137,7 +137,7 @@ print_cap_data(struct tcb *const tcp, const kernel_ulong_t addr,
|
||||
|
||||
SYS_FUNC(capget)
|
||||
{
|
||||
cap_user_header_t h;
|
||||
const struct user_cap_header_struct *h;
|
||||
|
||||
if (entering(tcp)) {
|
||||
h = get_cap_header(tcp, tcp->u_arg[0]);
|
||||
@ -152,7 +152,8 @@ SYS_FUNC(capget)
|
||||
|
||||
SYS_FUNC(capset)
|
||||
{
|
||||
cap_user_header_t h = get_cap_header(tcp, tcp->u_arg[0]);
|
||||
const struct user_cap_header_struct *const h =
|
||||
get_cap_header(tcp, tcp->u_arg[0]);
|
||||
print_cap_header(tcp, tcp->u_arg[0], h);
|
||||
tprints(", ");
|
||||
print_cap_data(tcp, tcp->u_arg[1], h);
|
||||
|
@ -39,7 +39,7 @@
|
||||
# include <unistd.h>
|
||||
|
||||
static long
|
||||
k_tgsigqueueinfo(const pid_t pid, const int sig, const void const *info)
|
||||
k_tgsigqueueinfo(const pid_t pid, const int sig, const void *const info)
|
||||
{
|
||||
return syscall(__NR_rt_tgsigqueueinfo,
|
||||
(unsigned long) 0xffffffff00000000ULL | pid,
|
||||
|
@ -63,7 +63,7 @@ main(void)
|
||||
const time_t t = time(NULL);
|
||||
const struct tm * const p = localtime(&t);
|
||||
const struct utimbuf u = { .actime = t, .modtime = t };
|
||||
const struct utimbuf const *tail_u = tail_memdup(&u, sizeof(u));
|
||||
const struct utimbuf *const tail_u = tail_memdup(&u, sizeof(u));
|
||||
const char *const dummy_filename =
|
||||
tail_memdup(dummy_str, sizeof(dummy_str) - 1);
|
||||
|
||||
|
@ -144,7 +144,7 @@ poison(unsigned int v)
|
||||
static long
|
||||
do_waitid(const unsigned int idtype,
|
||||
const unsigned int id,
|
||||
const siginfo_t const *infop,
|
||||
const siginfo_t *const infop,
|
||||
const unsigned int options,
|
||||
const struct rusage *const rusage)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user