Project

General

Profile

Bug #12885

efcode: smatch and build errors

Added by Toomas Soome 4 months ago. Updated about 2 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Cleaning up efcode build (SPARC):

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../jupiter.c:244 do_device_id() warn: this array is probably non-NULL. 'cdp->fc.unit_address'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../gp2.c:168 do_encode_unit() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../gp2.c:170 do_encode_unit() error: unchecked function return 'sprintf'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../pci.c:246 do_encode_unit() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../pci.c:248 do_encode_unit() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../pci.c:292 do_device_id() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../pci.c:316 do_class_id() error: unchecked function return 'sprintf'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../load_node.c:74 build_default_search_path() error: unchecked function return 'sysinfo'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../load_node.c:75 build_default_search_path() error: unchecked function return 'uname'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../load_node.c:83 build_default_search_path() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../load_node.c:89 build_default_search_path() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../load_node.c:124 search_path() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../load_node.c:172 is_fcode_file() error: unchecked function return 'close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../load_node.c:178 is_fcode_file() error: unchecked function return 'close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../load_node.c:197 find_lib_file() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../load_node.c:248 install_node_data() error: unchecked function return 'strcpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../load_node.c:249 install_node_data() error: unchecked function return 'strcat'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../load_node.c:264 install_node_data() error: unchecked function return 'strcat'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../ioctl.c:88 fc_run_priv() warn: maybe use && instead of &

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: efdaemon.c:92 main() error: unchecked function return 'close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: efdaemon.c:116 main() error: unchecked function return 'setpgrp'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: efdaemon.c:117 main() error: unchecked function return 'close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: efdaemon.c:118 main() error: unchecked function return 'close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: efdaemon.c:119 main() error: unchecked function return 'close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: efdaemon.c:130 main() error: unchecked function return 'sleep'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: efdaemon.c:141 main() error: unchecked function return 'close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: efdaemon.c:151 main() error: unchecked function return 'sleep'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: efdaemon.c:181 main() error: unchecked function return 'close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: efdaemon.c:187 main() error: unchecked function return 'fcntl'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: efdaemon.c:193 main() error: unchecked function return 'sleep'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../get_req.c:183 save_fcode_to_file() error: unchecked function return 'fwrite'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../get_req.c:184 save_fcode_to_file() error: unchecked function return 'fclose'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../get_req.c:330 get_request() error: unchecked function return 'close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../get_req.c:410 finish_request() error: unchecked function return 'close'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../misc.c:466 get_eeprom_value() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../misc.c:469 get_eeprom_value() error: unchecked function return 'fgets'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../misc.c:470 get_eeprom_value() error: unchecked function return 'pclose'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../parse.c:134 make_builtin_hooks() error: unchecked function return 'fclose'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../upa.c:54 do_encode_unit() error: unchecked function return 'sprintf'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../debug.c:242 acf_to_str() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../debug.c:729 debug_flags_to_mask() error: unchecked function return 'sscanf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../debug.c:731 debug_flags_to_mask() error: unchecked function return 'sscanf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../debug.c:733 debug_flags_to_mask() error: unchecked function return 'sscanf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../debug.c:932 ctrace() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../debug.c:938 ctrace() error: unchecked function return 'fclose'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../debug.c:972 forth_abort() error: unchecked function return 'vsprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../debug.c:998 forth_perror() error: unchecked function return 'vsprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../debug.c:1051 dump() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../debug.c:1415 dot_calls() error: unchecked function return 'search_all_dictionaries'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../debug.c:1487 do_memory_watch() error: unchecked function return 'do_fclib_step'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../package.c:591 locate_package() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../package.c:709 get_path() error: unchecked function return 'strcpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../package.c:710 get_path() error: unchecked function return 'strcat'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../package.c:712 get_path() error: unchecked function return 'strcat'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../properties.c:741 print_property() error: unchecked function return 'sprintf'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:69 do_emit() error: unchecked function return 'putchar'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:130 key() error: unchecked function return 'read'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:183 expect() error: unchecked function return 'strcpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:206 do_ms() error: unchecked function return 'nanosleep'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:217 do_get_msecs() error: unchecked function return 'gettimeofday'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:222 do_get_msecs() error: unchecked function return 'nanosleep'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:339 validfmt() error: unchecked function return 'strncpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:557 fmt_str() error: unchecked function return 'strncpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:558 fmt_str() error: unchecked function return 'strncpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:559 fmt_str() error: unchecked function return 'strncpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:567 fmt_str() error: unchecked function return 'strncpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:573 fmt_str() error: unchecked function return 'strncpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:579 fmt_str() error: unchecked function return 'strncpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:583 fmt_str() error: unchecked function return 'strncpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:585 fmt_str() error: unchecked function return 'strncpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:622 fmt_str() error: unchecked function return 'strncpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:724 fc_cmn_start() error: unchecked function return 'strcpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:728 fc_cmn_start() error: unchecked function return 'strcpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../env.c:730 fc_cmn_start() error: unchecked function return 'strncpy'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../log.c:186 log_message() error: unchecked function return 'vsprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../log.c:193 log_message() error: unchecked function return 'fprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../log.c:194 log_message() error: unchecked function return 'fflush'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../log.c:201 log_message() error: unchecked function return 'strcat'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../log.c:224 debug_msg() error: unchecked function return 'vsprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../log.c:240 log_perror() error: unchecked function return 'vsprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../log.c:241 log_perror() error: unchecked function return 'sprintf'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../log.c:336 set_error_log() error: unchecked function return 'fclose'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../extend.c:60 do_dlclose() error: unchecked function return 'dlclose'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../alarm.c:57 catch_alarm() error: unchecked function return 'signal'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../alarm.c:58 catch_alarm() error: unchecked function return 'alarm'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../alarm.c:74 do_alarm() error: unchecked function return 'alarm'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../alarm.c:75 do_alarm() error: unchecked function return 'signal'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../alarm.c:80 do_alarm() error: unchecked function return 'signal'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../alarm.c:84 do_alarm() error: unchecked function return 'alarm'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../signal.c:60 process_signal() error: unchecked function return 'ioctl'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../signal.c:65 process_signal() error: unchecked function return 'ioctl'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../signal.c:78 install_handlers() error: unchecked function return 'ioctl'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../signal.c:80 install_handlers() error: unchecked function return 'sigemptyset'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../signal.c:85 install_handlers() error: unchecked function return 'sigaction'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../signal.c:86 install_handlers() error: unchecked function return 'sigaction'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../signal.c:87 install_handlers() error: unchecked function return 'sigaction'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../signal.c:88 install_handlers() error: unchecked function return 'sigaction'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../signal.c:89 install_handlers() error: unchecked function return 'sigaction'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../signal.c:90 install_handlers() error: unchecked function return 'sigaction'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../interactive.c:346 load_file() error: unchecked function return 'fstat'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../interactive.c:355 load_file() error: unchecked function return 'close'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../interactive.c:507 read_line() error: unchecked function return 'fgets'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../interactive.c:513 read_line() error: unchecked function return 'ioctl'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../interactive.c:518 read_line() error: unchecked function return 'ioctl'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../interactive.c:630 read_line() error: unchecked function return 'strcpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../interactive.c:639 read_line() error: unchecked function return 'strcpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../interactive.c:756 read_line() error: unchecked function return 'ioctl'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../interactive.c:766 set_prompt() error: unchecked function return 'strncpy'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../fcode.c:342 token_common() error: unchecked function return 'strncpy'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../forth.c:692 pack_str() error: unchecked function return 'strncpy'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../forth.c:2419 throw_from_fclib() error: unchecked function return 'vsprintf'

    ../env.c: In function 'keyquestion':
    ../env.c:103:6: error: variable 'ret' set but not used [-Werror=unused-but-set-v
    ariable]
      int ret;
          ^~~
    ../env.c: In function 'validfmt':
    ../env.c:354:6: error: this statement may fall through [-Werror=implicit-fallthr
    ough=]
       if (isll)
          ^
    ../env.c:356:2: note: here
      case 'd':
      ^~~~
    ../env.c: In function 'fmt_args':
    ../env.c:410:8: error: this statement may fall through [-Werror=implicit-fallthr
    ough=]
        cnv = 16;
        ~~~~^~~~
    ../env.c:411:3: note: here
       case 'd':
       ^~~~

    ../signal.c: In function 'process_signal':
    ../signal.c:54:3: error: this statement may fall through [-Werror=implicit-fallt
    hrough=]
       forth_abort(saved_envp, "%s: Fault Addr: 0x%08x",
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           strsignal(sig), sip->si_addr);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../signal.c:57:2: note: here
      case SIGQUIT:
      ^~~~
    cc1: all warnings being treated as errors

    ../upload.c: In function 'validate_nodes':
    ../upload.c:160:6: error: variable 'error' set but not used [-Werror=unused-but-
    set-variable]
      int error;
          ^~~~~

    ../phandle.c: In function 'allocate_phandle':
    ../phandle.c:138:6: error: variable 'error' set but not used [-Werror=unused-but
    -set-variable]
      int error;
          ^~~~~
    cc1: all warnings being treated as errors

Testing done: build/install/boot


Related issues

Related to illumos gate - Feature #12484: efcode: smatch errorsClosed

Actions

History

#1

Updated by Toomas Soome 4 months ago

  • Description updated (diff)
  • Gerrit CR set to 746
#2

Updated by Electric Monk about 2 months ago

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

git commit 09e6639baaf32231365cb9895bf1e0ea006a2a60

commit  09e6639baaf32231365cb9895bf1e0ea006a2a60
Author: Toomas Soome <tsoome@me.com>
Date:   2020-09-08T05:49:33.000Z

    12885 efcode: smatch and build errors
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

#3

Updated by Toomas Soome about 2 months ago

Also available in: Atom PDF