Project

General

Profile

Actions

Bug #12378

closed

ata: variable may be used uninitialized

Added by Toomas Soome about 2 years ago. Updated about 2 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with gcc 9:

    In file included from ../../intel/io/dktp/hba/ghd/ghd_timer.c:36:
    ../../intel/io/dktp/hba/ghd/ghd_timer.c: In function 'ghd_timer_newstate':
    ../../intel/io/dktp/hba/ghd/ghd.h:423:47: error: 'gsav.cmd_gtgtp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      423 | #define GCMDP2GDEVP(gcmdp) ((gcmdp)->cmd_gtgtp->gt_gdevp)
          |                                               ^~
    ../../intel/io/dktp/hba/ghd/ghd_timer.c:323:9: note: 'gsav.cmd_gtgtp' was declared here
      323 |  gcmd_t gsav;
          |         ^~~~
    ../../intel/io/dktp/hba/ghd/ghd_timer.c:461:36: error: 'new_timeout' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      461 |   if (gcmdp != NULL && new_timeout != 0) {
          |                        ~~~~~~~~~~~~^~~~

    ../../intel/io/dktp/controller/ata/ata_disk.c: In function 'ata_disk_reset':
    ../../intel/io/dktp/controller/ata/ata_disk.c:943:27: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      943 |  return (rc ? DDI_SUCCESS : DDI_FAILURE);
          |         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

Testing done: build/install/boot

Actions #1

Updated by Toomas Soome about 2 years ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk about 2 years ago

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

git commit 1bff1300cebf1ea8e11ce928b10e208097e67f24

commit  1bff1300cebf1ea8e11ce928b10e208097e67f24
Author: Toomas Soome <tsoome@me.com>
Date:   2020-03-19T14:38:50.000Z

    12378 ata: variable may be used uninitialized
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Reviewed by: Gary Mills <gary_mills@fastmail.fm>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF