[PR #86] [CLOSED] Fix incorrect int->float conversion caught by clang -Wimplicit-int-float-conversion #155

Open
opened 2026-01-31 21:30:02 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/qemu/qemu/pull/86
Author: @MaskRay
Created: 11/16/2019
Status: Closed

Base: masterHead: Wimplicit-int-float-conversion


📝 Commits (1)

  • 6fe144d Fix incorrect int->float conversion caught by clang -Wimplicit-int-float-conversion

📊 Changes

2 files changed (+4 additions, -4 deletions)

View changed files

📝 migration/migration.c (+2 -2)
📝 util/cutils.c (+2 -2)

📄 Description

The warning will be enabled by default in clang 10. It is not available for clang <= 9.

qemu/migration/migration.c:2038:24: error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
...
qemu/util/cutils.c:245:23: error: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709550592 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/qemu/qemu/pull/86 **Author:** [@MaskRay](https://github.com/MaskRay) **Created:** 11/16/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `Wimplicit-int-float-conversion` --- ### 📝 Commits (1) - [`6fe144d`](https://github.com/qemu/qemu/commit/6fe144d9358d7dff9c81f47381b5ce3cf8426dd0) Fix incorrect int->float conversion caught by clang -Wimplicit-int-float-conversion ### 📊 Changes **2 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `migration/migration.c` (+2 -2) 📝 `util/cutils.c` (+2 -2) </details> ### 📄 Description The warning will be enabled by default in clang 10. It is not available for clang <= 9. ``` qemu/migration/migration.c:2038:24: error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion] ... qemu/util/cutils.c:245:23: error: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709550592 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion] ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 21:30:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/qemu#155