Project

General

Profile

Bug #12410

bpf: variable may be used uninitialized

Added by Toomas Soome 8 months ago. Updated 8 months ago.

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Build errors with gcc 9:

    ../../common/io/bpf/bpf.c: In function 'bpf_attachd':
    ../../common/io/bpf/bpf.c:253:6: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      253 |  int error;
          |      ^~~~~

../../common/io/bpf/bpf.c: In function 'bpf_attachd':
../../common/io/bpf/bpf.c:317:12: error: 'bpr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  317 |  d->bd_mac = *bpr;
      |  ~~~~~~~~~~^~~~~~

    cc1: all warnings being treated as errors

#1

Updated by Toomas Soome 8 months ago

  • Description updated (diff)
#2

Updated by Electric Monk 8 months ago

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

git commit 1c189586e43914686758de5408f8a41d8a39528e

commit  1c189586e43914686758de5408f8a41d8a39528e
Author: Toomas Soome <tsoome@me.com>
Date:   2020-04-07T05:45:45.000Z

    12410 bpf: variable may be used uninitialized
    Reviewed by: Yuri Pankov <ypankov@fastmail.com>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF