Skip to content

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

Merged
mhucka merged 4 commits intomasterfrom
mh-fix-845-format-args
Aug 15, 2025
Merged

Fix #845: incorrect function arguments in fuser_mqubit.h#850
mhucka merged 4 commits intomasterfrom
mh-fix-845-format-args

Conversation

@mhucka
Copy link
Copy Markdown
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.
@github-actions github-actions Bot added the size: XS <10 lines changed label Jul 31, 2025
@mhucka mhucka self-assigned this Jul 31, 2025
@mhucka mhucka marked this pull request as ready for review August 14, 2025 02:55
@mhucka mhucka enabled auto-merge (squash) August 15, 2025 20:23
@mhucka mhucka merged commit d615b50 into master Aug 15, 2025
49 checks passed
@mhucka mhucka deleted the mh-fix-845-format-args branch August 15, 2025 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS <10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants