Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trace: fix minor issue about printf data type and value range #743

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

XinfengZhang
Copy link
Contributor

No description provided.

}
va_TraceMsg(trace_ctx, "\t\t num_layers=%d\n", tmp->num_layers);
for (j = 0; j < tmp->num_layers; j++) {
for (j = 0; j < tmp->num_layers && tmp->num_layers <= 4; j++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. You should be doing same for num_objects, right?
  2. I think better to derive from real array size and avoid hardcoding 4 here:
tmp->num_layers <= sizeof(tmp->layers)/sizeof(tmp->layers[0])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. You should be doing same for num_objects, right?

yes, correct, will update

  1. I think better to derive from real array size and avoid hardcoding 4 here:

"4" comes from VADRMPRIMESurfaceDescriptor , it is fix value.

Copy link
Contributor

@dvrogozh dvrogozh left a comment

Choose a reason for hiding this comment

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

looks good

@XinfengZhang XinfengZhang merged commit 4aec726 into intel:master Aug 29, 2023
13 checks passed
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