1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Remove more (void) and fix -Wall warnings.

This commit is contained in:
Bruce Momjian
1997-08-12 22:55:25 +00:00
parent 0f6a961e29
commit ea5b5357cd
79 changed files with 316 additions and 323 deletions

View File

@ -135,7 +135,7 @@ size_t errbuf_size;
if (errcode&REG_ITOA) {
if (r->code != 0)
(void) strcpy(convbuf, r->name);
strcpy(convbuf, r->name);
else
sprintf(convbuf, "REG_0x%x", target);
assert(strlen(convbuf) < sizeof(convbuf));
@ -147,9 +147,9 @@ size_t errbuf_size;
len = strlen(s) + 1;
if (errbuf_size > 0) {
if (errbuf_size > len)
(void) strcpy(errbuf, s);
strcpy(errbuf, s);
else {
(void) strncpy(errbuf, s, errbuf_size-1);
strncpy(errbuf, s, errbuf_size-1);
errbuf[errbuf_size-1] = '\0';
}
}