Skip to content

Commit

Permalink
kunit: platform: Resolve 'struct completion' warning
Browse files Browse the repository at this point in the history
If the <kunit/platform_device.h> header is included in a test without
certain other headers, it produces compiler warnings like:

In file included from [...]
../include/kunit/platform_device.h:15:57: warning: ‘struct completion’
declared inside parameter list will not be visible outside of this
definition or declaration
   15 |                                                  struct completion *x);
      |                                                         ^~~~~~~~~~

Add a 'struct completion' forward declaration to resolve this.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
  • Loading branch information
computersforpeace authored and shuahkh committed Jan 11, 2025
1 parent 40384c8 commit 875aec2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/kunit/platform_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#ifndef _KUNIT_PLATFORM_DRIVER_H
#define _KUNIT_PLATFORM_DRIVER_H

struct completion;
struct kunit;
struct platform_device;
struct platform_driver;
Expand Down

0 comments on commit 875aec2

Please sign in to comment.