11440 tar: NULL pointer errors

Review Request #2158 - Created July 11, 2019 and submitted

Information
Toomas Soome
illumos-gate
11440
3970ac1...
Reviewers
general
tar.c: In function 'convtoreg':
tar.c:2703:28: error: comparison between pointer and integer [-Werror]
      (dblock.dbuf.typeflag != NULL) && (dblock.dbuf.typeflag != '1') &&
                            ^~
tar.c: In function 'doxtract':
tar.c:3216:15: error: comparison between pointer and integer [-Werror]
    if (*linkp !=  NULL) {
               ^~
tar.c:3257:15: error: comparison between pointer and integer [-Werror]
    if (*linkp != NULL) {
               ^~
tar.c:3306:15: error: comparison between pointer and integer [-Werror]
    if (*linkp != NULL) {
               ^~
tar.c:3446:28: error: comparison between pointer and integer [-Werror]
       dblock.dbuf.typeflag == NULL || convflag) {
                            ^~
tar.c:3449:15: error: comparison between pointer and integer [-Werror]
    if (*linkp != NULL) {
               ^~
tar.c:3655:28: error: comparison between pointer and integer [-Werror]
       dblock.dbuf.typeflag == NULL ||
                            ^~
tar.c: In function 'add_file_to_table':
tar.c:5529:26: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   name[strlen(name) - 1] = NULL;
                          ^
tar.c: In function 'is_in_table':
tar.c:5567:26: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   name[strlen(name) - 1] = NULL;
                          ^
tar.c:5586:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *ptr = NULL;
        ^
tar.c: In function 'delete_target':
tar.c:6664:15: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      buf[n] = (char)NULL;
               ^
cc1: all warnings being treated as errors

  
Andy Fiddaman
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...