10308 tset: NULL pointer errors

Review Request #1401 - Created Jan. 27, 2019 and submitted

Information
Toomas Soome
illumos-gate
10308
e57faba...
Reviewers
general
tset.c: In function 'main':
tset.c:546:13: error: comparison between pointer and integer [-Werror]
    if (*++p == NULL)
             ^~
tset.c:563:12: error: comparison between pointer and integer [-Werror]
     if (*p == NULL)
            ^~
tset.c:566:28: error: comparison between pointer and integer [-Werror]
      if (*p == '^' && p[1] != NULL)
                            ^~
tset.c:578:12: error: comparison between pointer and integer [-Werror]
     if (*p == NULL)
            ^~
tset.c:581:28: error: comparison between pointer and integer [-Werror]
      if (*p == '^' && p[1] != NULL)
                            ^~
tset.c:593:12: error: comparison between pointer and integer [-Werror]
     if (*p == NULL)
            ^~
tset.c:596:28: error: comparison between pointer and integer [-Werror]
      if (*p == '^' && p[1] != NULL)
                            ^~
tset.c:628:12: error: comparison between pointer and integer [-Werror]
     if (*p == NULL) {
            ^~
tset.c:645:12: error: comparison between pointer and integer [-Werror]
     if (*p == NULL) {
            ^~
tset.c:658:6: error: pointers are not permitted as case values
      case NULL:
      ^~~~
tset.c:663:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *p++ = NULL;
            ^
tset.c:669:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *p++ = NULL;
            ^
tset.c:674:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *p++ = NULL;
            ^
tset.c:680:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *p++ = NULL;
            ^
tset.c:685:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *p++ = NULL;
            ^
tset.c:705:12: error: comparison between pointer and integer [-Werror]
     if (*p == NULL) {
            ^~
tset.c:749:10: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
     *p-- = NULL;
          ^
tset.c: In function 'reportek':
tset.c:1192:64: error: comparison between pointer and integer [-Werror]
  if (tgetstr("kb", &bufp) > (char *)0 && n == buf[0] && buf[1] == NULL)
                                                                ^~
tset.c: In function 'makealias':
tset.c:1344:9: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
    *a++ = NULL;
         ^
tset.c:1350:5: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  *a = NULL;
     ^
tset.c: In function 'baudrate':
tset.c:1512:9: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  buf[i] = NULL;
         ^
tset.c: In function 'mapped':
tset.c:1532:21: error: comparison between pointer and integer [-Werror]
   if (*(Map->Ident) == NULL ||
                     ^~
cc1: all warnings being treated as errors

  

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Robert Mustacchi
Andrew Stormont
Gergő Mihály Doma
Gergő Mihály Doma
Toomas Soome
Gergő Mihály Doma
Robert Mustacchi
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...