Project

General

Profile

Actions

Bug #12459

closed

iwn: possible unaligned pointer issue

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build error with gcc 9:

../../common/io/iwn/if_iwn.c: In function 'iwn_fatal_intr':
../../common/io/iwn/if_iwn.c:3247:6: error: converting a packed 'struct iwn_fw_dump' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Werror=address-of-packed-member]
 3247 |      sizeof (dump) / sizeof (uint32_t));
      |      ^~~~~~
In file included from ../../common/io/iwn/if_iwn.c:77:
../../common/io/iwn/if_iwnreg.h:1464:8: note: defined here
 1464 | struct iwn_fw_dump {
      |        ^~~~~~~~~~~
cc1: all warnings being treated as errors

Tested by Hans Rosenfeld.

Actions #1

Updated by Toomas Soome about 2 years ago

  • Subject changed from iwn: possible unaligned pointer issue to iwn: possible unaligned pointer issue
Actions #2

Updated by Toomas Soome almost 2 years ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk almost 2 years ago

  • Gerrit CR set to 483
Actions #4

Updated by Electric Monk almost 2 years ago

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

git commit 35060ceaa548c2d6fa63812e06a1a0f8dc4a06b0

commit  35060ceaa548c2d6fa63812e06a1a0f8dc4a06b0
Author: Toomas Soome <tsoome@me.com>
Date:   2020-06-29T16:00:09.000Z

    12459 iwn: possible unaligned pointer issue
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF