[PR #839] [MERGED] Fix clang-10 compilation issue #1436

Open
opened 2026-01-29 20:54:05 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/google/brotli/pull/839
Author: @rojkov
Created: 9/4/2020
Status: Merged
Merged: 9/7/2020
Merged by: @eustas

Base: masterHead: clang-10-fix


📝 Commits (1)

  • 092f9c4 Fix clang-10 compilation issue

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 c/enc/bit_cost.h (+1 -1)

📄 Description

clang-10 throws the following error:

In file included from external/org_brotli/c/enc/bit_cost.c:9:
external/org_brotli/c/enc/./bit_cost.h:48:16: error: implicit conversion from 'size_t' (aka 'unsigned long') to 'double' may lose precision [-Werror,-Wimplicit-int-float-conversion]
  if (retval < sum) {
             ~ ^~~
1 error generated.

Make the conversion explicit.


🔄 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/google/brotli/pull/839 **Author:** [@rojkov](https://github.com/rojkov) **Created:** 9/4/2020 **Status:** ✅ Merged **Merged:** 9/7/2020 **Merged by:** [@eustas](https://github.com/eustas) **Base:** `master` ← **Head:** `clang-10-fix` --- ### 📝 Commits (1) - [`092f9c4`](https://github.com/google/brotli/commit/092f9c4a9b045dd008b46385a41d23d9b0cc6970) Fix clang-10 compilation issue ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `c/enc/bit_cost.h` (+1 -1) </details> ### 📄 Description clang-10 throws the following error: ``` In file included from external/org_brotli/c/enc/bit_cost.c:9: external/org_brotli/c/enc/./bit_cost.h:48:16: error: implicit conversion from 'size_t' (aka 'unsigned long') to 'double' may lose precision [-Werror,-Wimplicit-int-float-conversion] if (retval < sum) { ~ ^~~ 1 error generated. ``` Make the conversion explicit. --- <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-29 20:54:05 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#1436