-
-
usr/src/cmd/sort/common/utility.c (Diff revision 1) Just weird..
int cxwrite(int fd, char *ptr, size_t nbytes) { ... write(fd, buffer, offset)
I have no idea what the new line should look like.
The second argument should most likely be NULL rather than 0, but then why 1 byte for the last argument?
Writing to STDIN makes little sense..return (cxwrite(FILENO_STDOUT, NULL, 0));
? Your guess is as good as mine!
11431 sort: NULL pointer errors
Review Request #2149 — Created July 11, 2019 and submitted
Information | |
---|---|
tsoome | |
illumos-gate | |
11431 | |
7042080... | |
Reviewers | |
general | |
In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0, from /code/illumos-gate/proto/root_i386/usr/include/time.h:40, from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462, from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53, from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640, from /code/illumos-gate/proto/root_i386/usr/include/sys/mman.h:54, from ../common/utility.h:36, from ../common/utility.c:29: ../common/utility.c: In function 'wxwrite': /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 1 of 'cxwrite' makes integer from pointer without a cast [-Werror=int-conversion] #define NULL ((void *)0) ^ ../common/utility.c:559:19: note: in expansion of macro 'NULL' return (cxwrite(NULL, 0, 1)); ^~~~ ../common/utility.c:494:1: note: expected 'int' but argument is of type 'void *' cxwrite(int fd, char *ptr, size_t nbytes) ^~~~~~~ cc1: all warnings being treated as errors
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+1 -3) |