Project

General

Profile

Bug #10313

iconv_modules: NULL pointer errors

Added by Toomas Soome 11 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2019-01-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    ../common/zh_TW-iso2022-CN-EXT%zh_TW-big5.c: In function 'chinese_to_big5':
    ../common/zh_TW-iso2022-CN-EXT%zh_TW-big5.c:63:18: error: comparison between pointer and integer [-Werror]
      if ( st->SSfunc == NULL && st->SOcharset == 'A') { /* GB2312 */
                      ^~

    ../common/zh_TW-iso2022-CN-EXT.c: In function '_icv_open':
    ../common/zh_TW-iso2022-CN-EXT.c:67:16: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      st->SOcharset = NULL;  /* no default charset */
                    ^
    ../common/zh_TW-iso2022-CN-EXT.c:68:17: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      st->SS2charset = NULL;  /* no default charset */
                     ^
    ../common/zh_TW-iso2022-CN-EXT.c:69:17: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      st->SS3charset = NULL;  /* no default charset */
                     ^
    ../common/zh_TW-iso2022-CN-EXT.c: In function 'iso2022_icv_iconv':
    ../common/zh_TW-iso2022-CN-EXT.c:126:20: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
          st->SOcharset = NULL;
                        ^
    ../common/zh_TW-iso2022-CN-EXT.c:127:21: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
          st->SS2charset = NULL;
                         ^
    ../common/zh_TW-iso2022-CN-EXT.c:128:21: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
          st->SS3charset = NULL;
                         ^
    ../common/zh_TW-iso2022-CN-EXT.c:216:39: error: comparison between pointer and integer [-Werror]
       if ( **inbuf == SO && st->SOcharset != NULL ){
                                           ^~
    ../common/zh_TW-iso2022-CN-EXT.c: In function 'process_esc_seq':
    ../common/zh_TW-iso2022-CN-EXT.c:271:23: error: comparison between pointer and integer [-Werror]
       if ( st->SS2charset == NULL ){
                           ^~
    ../common/zh_TW-iso2022-CN-EXT.c:284:23: error: comparison between pointer and integer [-Werror]
       if ( st->SS3charset == NULL ){
                           ^~
    ../common/zh_TW-iso2022-CN-EXT.c: In function 'iscns':
    ../common/zh_TW-iso2022-CN-EXT.c:387:18: error: comparison between pointer and integer [-Werror]
      if ( st->SSfunc == NULL && st->SOcharset == 'G' )
                      ^~

    ../common/zh_TW-iso2022-CN-EXT%zh_TW-euc.c: In function 'chinese_to_euc':
    ../common/zh_TW-iso2022-CN-EXT%zh_TW-euc.c:57:18: error: comparison between pointer and integer [-Werror]
      if ( st->SSfunc == NULL && st->SOcharset == 'A') { /* GB2312 */
                      ^~

    ../common/zh_TW-iso2022-7%zh_TW-euc.c: In function '_icv_iconv':
    ../common/zh_TW-iso2022-7%zh_TW-euc.c:309:32: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        st->keepc[2] = st->keepc[3] = NULL;
                                    ^

    ../common/zh_TW-iso2022-7%zh_TW-big5.c: In function '_icv_iconv':
    ../common/zh_TW-iso2022-7%zh_TW-big5.c:245:32: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        st->keepc[2] = st->keepc[3] = NULL;
                                    ^
    ../common/zh_TW-iso2022-7%UTF-8.c: In function '_icv_iconv':
    ../common/zh_TW-iso2022-7%UTF-8.c:245:32: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        st->keepc[2] = st->keepc[3] = NULL;
                                    ^
    ../common/zh_TW-euc%zh_TW-big5.c: In function '_icv_iconv':
    ../common/zh_TW-euc%zh_TW-big5.c:156:34: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
          st->keepc[2] = st->keepc[3] = NULL;
                                      ^

    ../common/zh_TW-euc%zh_TW-iso2022-7.c: In function '_icv_iconv':
    ../common/zh_TW-euc%zh_TW-iso2022-7.c:210:34: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
          st->keepc[2] = st->keepc[3] = NULL;
                                      ^

    ../common/UTF-8%zh_TW-big5p.c: In function 'utf8_to_big5p':
    ../common/UTF-8%zh_TW-big5p.c:364:15: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      big5p_str[2] = NULL;
                   ^

    ../common/zh_TW-big5%zh_TW-euc.c: In function 'big5_to_cns':
    ../common/zh_TW-big5%zh_TW-euc.c:303:40: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       cns_str[2] = cns_str[3] = cns_str[4] = NULL;
                                            ^
    ../common/zh_TW-big5%zh_TW-euc.c:326:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       cns_str[4] = NULL;
                  ^

    ../common/UTF-8%zh_TW-euc.c: In function 'utf8_to_cns':
    ../common/UTF-8%zh_TW-euc.c:489:40: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       cns_str[2] = cns_str[3] = cns_str[4] = NULL;
                                            ^
    ../common/UTF-8%zh_TW-euc.c:512:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       cns_str[4] = NULL;
                  ^

    ../common/UTF-8%zh_TW-big5.c: In function 'utf8_to_big5':
    ../common/UTF-8%zh_TW-big5.c:461:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      big5_str[2] = NULL;
                  ^

    ../common/UTF-8%zh_HK.hkscs.c: In function 'utf8_to_hkscs':
    ../common/UTF-8%zh_HK.hkscs.c:442:15: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      hkscs_str[2] = NULL;
                   ^

    ../common/zh_TW-euc%UTF-8.c: In function '_icv_iconv':
    ../common/zh_TW-euc%UTF-8.c:197:34: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
          st->keepc[2] = st->keepc[3] = NULL;
                                      ^

    ../../common/utf8%ibm.c: In function 'utf8_to_ibm':
    ../../common/utf8%ibm.c:319:20: error: assignment makes integer from pointer wit
    hout a cast [-Werror=int-conversion]
             ibm_str[2] = NULL;
                        ^
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 10 months ago

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

git commit f642269fe771b10890afea92038f4531cd50cfd9

commit  f642269fe771b10890afea92038f4531cd50cfd9
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-04T18:39:11.000Z

    10313 iconv_modules: NULL pointer errors
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF