11324 expr: NULL pointer errors

Review Request #2062 - Created July 4, 2019 and submitted

Information
Toomas Soome
illumos-gate
11324
23ecf65...
Reviewers
general
In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                 from expr.c:29:
expr.c: In function 'ematch':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'mbstowcs' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
expr.c:444:41: note: in expansion of macro 'NULL'
   if ((nmbchars = mbstowcs(NULL, tmptr, NULL)) == -1) {
                                         ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37:0,
                 from expr.c:29:
/code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:144:15: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
 extern size_t mbstowcs(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
               ^~~~~~~~

../expr/compile.c: In function 'dhl_compile':
../expr/compile.c:152:16: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  if (*instr == (char) NULL) {
                ^
cc1: all warnings being treated as errors

  
Garrett D'Amore
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...