Skip to content

third-party:glad: ignore pedantic directive for sensitive code - #11395

Merged
Nir-Az merged 2 commits into
realsenseai:developmentfrom
dmipx:glad-warning
Feb 5, 2023
Merged

Nir-Az merged 2 commits into
realsenseai:developmentfrom
dmipx:glad-warning

Conversation

@dmipx

@dmipx dmipx commented Feb 5, 2023

Copy link
Copy Markdown

ISO C forbids conversion of object pointer to function pointer type

Signed-off-by: Dmitry Perchanov dmitry.perchanov@intel.com

ISO C forbids conversion of object pointer to function pointer type

Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>
@dmipx
dmipx requested a review from Nir-Az February 5, 2023 12:29
@Nir-Az

Nir-Az commented Feb 5, 2023

Copy link
Copy Markdown
Collaborator

Retriggered libci for jetson and it passed

Comment thread third-party/glad/glad.c Outdated
PFNGLOBJECTPTRLABELKHRPROC glad_glObjectPtrLabelKHR = NULL;
PFNGLGETOBJECTPTRLABELKHRPROC glad_glGetObjectPtrLabelKHR = NULL;
PFNGLGETPOINTERVKHRPROC glad_glGetPointervKHR = NULL;
#pragma GCC diagnostic push

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. This is a great initiative
  2. This warning is on Linux only - lets wrap the lines with #if defined __linux__ && #endif
  3. Lets also add a notice that we manually change this auto generated file to avoid compiler warnings

Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@Nir-Az
Nir-Az merged commit 58089fc into realsenseai:development Feb 5, 2023
@dmipx
dmipx deleted the glad-warning branch February 26, 2023 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants