Closed tytan652 closed 2 years ago
To me it feels like the better fix would be using the existing macro instead of redefining a new one. My assumption is that the redefinition is from a time where out-of-tree builds for obs-browser were a thing and as such the libobs one couldn't be relied on, but that's not supported anymore.
The two macros looked are different. This is why I just use a #undef
.
The two macros are different. This is why I just use a
#undef
.
Not sure what you mean by different: https://github.com/obsproject/obs-studio/blob/9168797361e0c6cddbfd06761bfbca136960e93d/libobs/util/c99defs.h#L24
#define UNUSED_PARAMETER(param) (void)param
#define UNUSED_PARAMETER(x) \
{ \
(void)x; \
}
These look functionally the same to me.
Waiting for obs-studio CI to check if the commit works.
Description
Remove the "original"
UNUSED_PARAMETER
and add the needed header file without guard.Motivation and Context
I'm actually working on a PR to treat warnings as errors.
How Has This Been Tested?
The warning/error no longer appear while building OBS Studio with this PR.
Types of changes
Checklist: