clang warning on master - Mailing list pgsql-hackers

From Pavel Stehule
Subject clang warning on master
Date
Msg-id CAFj8pRAxB4tdjQCdu-72GqrvVkVC_buUAwAGWrUedBRouG1Mxw@mail.gmail.com
Whole thread Raw
Responses Re: clang warning on master
List pgsql-hackers
Hi

I see a lot of warnings

[pavel@localhost postgresql]$ make all | grep warning
exec.c:280:2: warning: implicitly declaring library function 'strlcpy' with type 'unsigned long (char *, const char *, unsigned long)'
        strlcpy(link_buf, fname, sizeof(link_buf));
        ^
exec.c:280:2: note: please include the header <string.h> or explicitly provide a declaration for 'strlcpy'
1 warning generated.
exec.c:280:2: warning: implicitly declaring library function 'strlcpy' with type 'unsigned long (char *, const char *, unsigned long)'
        strlcpy(link_buf, fname, sizeof(link_buf));
        ^
exec.c:280:2: note: please include the header <string.h> or explicitly provide a declaration for 'strlcpy'
1 warning generated.
path.c:188:3: warning: implicitly declaring library function 'strlcpy' with type 'unsigned long (char *, const char *, unsigned long)'
                strlcpy(ret_path, head, MAXPGPATH);
                ^
path.c:188:3: note: please include the header <string.h> or explicitly provide a declaration for 'strlcpy'
1 warning generated.
path.c:188:3: warning: implicitly declaring library function 'strlcpy' with type 'unsigned long (char *, const char *, unsigned long)'
                strlcpy(ret_path, head, MAXPGPATH);
                ^
path.c:188:3: note: please include the header <string.h> or explicitly provide a declaration for 'strlcpy'
1 warning generated.
thread.c:77:2: warning: implicitly declaring library function 'strlcpy' with type 'unsigned long (char *, const char *, unsigned long)'
        strlcpy(strerrbuf, strerror(errnum), buflen);
        ^
thread.c:77:2: note: please include the header <string.h> or explicitly provide a declaration for 'strlcpy'
1 warning generated.
pgtz.c:53:2: warning: implicitly declaring library function 'strlcpy' with type 'unsigned long (char *, const char *, unsigned long)'
        strlcpy(tzdir + strlen(tzdir), "/timezone", MAXPGPATH - strlen(tzdir));
        ^
pgtz.c:53:2: note: please include the header <string.h> or explicitly provide a declaration for 'strlcpy'
1 warning generated.
xlog.c:5627:4: warning: implicitly declaring library function 'strlcpy' with type 'unsigned long (char *, const char *, unsigned long)'
                        strlcpy(recoveryStopName, recordRestorePointData->rp_name, MAXFNAMELEN);

Regards

Pavel

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pgbench throttling latency limit
Next
From: Tom Lane
Date:
Subject: Re: On partitioning