11335 mailx: NULL pointer errors

Review Request #2071 - Created July 6, 2019 and submitted

Information
Toomas Soome
illumos-gate
11335
5f2500f...
Reviewers
general
list.c: In function 'getmessage':
list.c:107:6: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  *ip = NULL;
      ^
list.c: In function 'getmsglist':
list.c:158:6: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  *ip = NULL;
      ^
list.c: In function 'first':
list.c:669:9: error: return makes integer from pointer without a cast [-Werror=int-conversion]
  return (NULL);
         ^

lex.c: In function 'execute':
lex.c:589:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
     *msgvec = NULL;
             ^
lex.c:593:15: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
     msgvec[1] = NULL;
               ^
lex.c:595:15: error: comparison between pointer and integer [-Werror]
   if (*msgvec == NULL) {
               ^~

collect.c: In function 'collect':
collect.c:243:60: error: comparison between pointer and integer [-Werror]
   if ((nread = getaline(linebuf,LINESIZE,stdin,&hasnulls)) == NULL) {
                                                            ^~
collect.c: In function 'forward':
collect.c:1091:14: error: comparison between pointer and integer [-Werror]
  if (*msgvec == NULL) {
              ^~
collect.c:1093:15: error: comparison between pointer and integer [-Werror]
   if (*msgvec == NULL) {
               ^~
collect.c:1097:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   msgvec[1] = NULL;
             ^
collect.c:1102:24: error: comparison between pointer and integer [-Werror]
  for (ip = msgvec; *ip != NULL; ip++) {
                        ^~

cmd4.c: In function 'dopipe':
cmd4.c:88:15: error: comparison between pointer and integer [-Werror]
   if (*msgvec == NULL) {
               ^~
cmd4.c:92:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   msgvec[1] = NULL;
             ^
cmd4.c: In function 'loadmsg':
cmd4.c:208:15: error: comparison between pointer and integer [-Werror]
   if (*msgvec == NULL) {
               ^~
cmd4.c:212:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   msgvec[1] = NULL;
             ^
cmd4.c:216:16: error: comparison between pointer and integer [-Werror]
  if (msgvec[1] != NULL) {
                ^~
cmd4.c: In function 'field':
cmd4.c:284:15: error: comparison between pointer and integer [-Werror]
   if (*msgvec == NULL) {
               ^~
cmd4.c:288:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   msgvec[1] = NULL;
             ^

cmd3.c: In function 'preserve':
cmd3.c:469:24: error: comparison between pointer and integer [-Werror]
  for (ip = msgvec; *ip != NULL; ip++) {
                        ^~
cmd3.c: In function 'unread':
cmd3.c:487:24: error: comparison between pointer and integer [-Werror]
  for (ip = msgvec; *ip != NULL; ip++) {
                        ^~
cmd3.c: In function 'messize':
cmd3.c:505:24: error: comparison between pointer and integer [-Werror]
  for (ip = msgvec; *ip != NULL; ip++) {
                        ^~

cmd2.c: In function 'next':
cmd2.c:78:14: error: comparison between pointer and integer [-Werror]
  if (*msgvec != NULL) {
              ^~
cmd2.c:116:10: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  list[1] = NULL;
          ^
cmd2.c: In function 'save1':
cmd2.c:157:15: error: comparison between pointer and integer [-Werror]
   if (*msgvec == NULL) {
               ^~
cmd2.c:161:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   msgvec[1] = NULL;
             ^
cmd2.c: In function 'put1':
cmd2.c:232:15: error: comparison between pointer and integer [-Werror]
   if (*msgvec == NULL) {
               ^~
cmd2.c:236:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   msgvec[1] = NULL;
             ^
cmd2.c: In function 'swrite':
cmd2.c:377:15: error: comparison between pointer and integer [-Werror]
   if (*msgvec == NULL) {
               ^~
cmd2.c:381:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   msgvec[1] = NULL;
             ^
cmd2.c: In function 'deltype':
cmd2.c:533:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
    list[1] = NULL;
            ^
cmd2.c: In function 'delm':
cmd2.c:555:7: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  last = NULL;
       ^
cmd2.c:556:24: error: comparison between pointer and integer [-Werror]
  for (ip = msgvec; *ip != NULL; ip++) {
                        ^~
cmd2.c:564:11: error: comparison between pointer and integer [-Werror]
  if (last != NULL) {
           ^~
cmd2.c:567:12: error: comparison between pointer and integer [-Werror]
   if (last != NULL) {
            ^~

cmd1.c: In function 'from':
cmd1.c:197:24: error: comparison between pointer and integer [-Werror]
  for (ip = msgvec; *ip != NULL; ip++) {
                        ^~
cc1: all warnings being treated as errors

  
Garrett D'Amore
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...