Skip to content

Fix #845: incorrect function arguments in fuser_mqubit.h #850

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mhucka
Copy link
Collaborator

@mhucka mhucka commented Jul 31, 2025

CodeQL scans flagged lines like this in file lib/fuser_mqubit.h:

IO::messagef(" gates are fused into %lu gates\n", stat.num_fused_gates);

The CodeQL warning is:

Each call to the printf function or a related function should include the type and sequence of arguments defined by the format. If the function is passed arguments of a different type or in a different sequence then the arguments are reinterpreted to fit the type and sequence expected, resulting in unpredictable behavior.

CodeQL scans flagged lines like this in file `lib/fuser_mqubit.h`:

```c++
IO::messagef(" gates are fused into %lu gates\n", stat.num_fused_gates);
```

The CodeQL warning is:

> Each call to the printf function or a related function should include the type and sequence of arguments defined by the format. If the function is passed arguments of a different type or in a different sequence then the arguments are reinterpreted to fit the type and sequence expected, resulting in unpredictable behavior.
@mhucka mhucka self-assigned this Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant