Project

General

Profile

Bug #11418

refer: NULL pointer errors

Added by Toomas Soome about 1 month ago. Updated 19 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL pointer:

    sortbib.c: In function 'sortbib':
    sortbib.c:139:42: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        *fld[0] = *fld[1] = *fld[2] = *fld[3] = NULL;
                                              ^
    sortbib.c: In function 'parse':
    sortbib.c:214:10: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *wd[i] = NULL;
              ^
    sortbib.c: In function 'eval':
    sortbib.c:293:17: error: comparison between pointer and integer [-Werror]
       if (keystr[i] == NULL)
                     ^~
    sortbib.c:297:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      keystr[j] = NULL;
                ^
    sortbib.c: In function 'endcomma':
    sortbib.c:324:10: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       str[n] = NULL;
              ^

    addbib.c: In function 'addbib':
    addbib.c:137:27: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
          line[strlen(line)-1] = NULL;
                               ^
    addbib.c:147:27: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
          line[strlen(line)-1] = NULL;
                               ^
    addbib.c: In function 'trim':
    addbib.c:200:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      line[++n] = NULL;
                ^
    addbib.c: In function 'bibedit':
    addbib.c:211:9: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      cmd[i] = NULL;
             ^
    addbib.c: In function 'rd_skel':
    addbib.c:264:28: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       bibskel[entry].prompt[i] = NULL;
                                ^
    addbib.c:274:28: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       bibskel[entry].keylet[j] = NULL;
                                ^

    refer4.c: In function 'append':
    refer4.c:53:6: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *p = NULL;
          ^
    refer4.c:63:7: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        *p = NULL;
           ^
    refer4.c:77:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
         *p = NULL;
            ^
    refer4.c:80:7: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        *p = NULL;
           ^

    refer2.c: In function 'doref':
    refer2.c:50:21: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      buff[0] = dbuff[0] = NULL;
                         ^
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 19 days ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit 7bc3049f70ccb68ec7cd7ba1bb17a4643fb60f36

commit  7bc3049f70ccb68ec7cd7ba1bb17a4643fb60f36
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-30T18:20:12.000Z

    11418 refer: NULL pointer errors
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF