Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,084
    • Issues 3,084
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 999
    • Merge requests 999
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • MesaMesa
  • mesamesa
  • Merge requests
  • !7941

util+treewide: container_of() cleanup

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rob Clark requested to merge robclark/mesa:wip/container-of-cleanup into master Dec 05, 2020
  • Overview 28
  • Commits 3
  • Pipelines 15
  • Changes 21

Replace mesa's slightly different container_of() with one more aligned to the linux kernel's version which takes a type as the 2nd param. This avoids silly warnings like:

freedreno_context.c:396:44: warning: variable 'batch' is uninitialized when used within its own initialization [-Wuninitialized]

At the same time, we can add additional build-time type-checking asserts

@kusma @jenatali I think I've covered the MSVC case sufficiently? At least the vs2019 CI job seems happy..

@majanes I updated my meson args based on what you are using, but can't rule out some difference due to missing -devel pkg, etc.. so you might want to feed this to at least the build-test steps in your CI?

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/container-of-cleanup