[GH-ISSUE #282] Warnings in RichEdit and RichText while compiling with MSVC #89

Open
opened 2026-05-05 03:39:02 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @klugier on GitHub (Jun 15, 2025).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/282

Here is the list of warnings while compiling with MSVC, they are mostly about data loss:

C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (43): warning C4244: "*=": conversion from "double" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (44): warning C4244: "argument": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (50): warning C4244: "initialization": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichEdit\DiagramEditor.cpp (214): warning C4927: illegal conversion; more than one user-defined conversion has been implicitly applied
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (65): warning C4244: "initialization": conversion from "double" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (78): warning C4244: "=": conversion from "double" to "T", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (176): warning C4244: "initialization": conversion from "double" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (200): warning C4244: "argument": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (204): warning C4244: "initialization": conversion from "const T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (323): warning C4244: "argument": conversion from "double" to "T", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (323): warning C4244: "argument": conversion from "double" to "T", possible loss of data
Originally created by @klugier on GitHub (Jun 15, 2025). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/282 Here is the list of warnings while compiling with MSVC, they are mostly about data loss: ``` C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (43): warning C4244: "*=": conversion from "double" to "int", possible loss of data C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (44): warning C4244: "argument": conversion from "T" to "int", possible loss of data C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (50): warning C4244: "initialization": conversion from "T" to "int", possible loss of data C:\Prototable\upp\git\uppsrc\RichEdit\DiagramEditor.cpp (214): warning C4927: illegal conversion; more than one user-defined conversion has been implicitly applied C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (65): warning C4244: "initialization": conversion from "double" to "int", possible loss of data C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (78): warning C4244: "=": conversion from "double" to "T", possible loss of data C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (176): warning C4244: "initialization": conversion from "double" to "int", possible loss of data C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (200): warning C4244: "argument": conversion from "T" to "int", possible loss of data C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (204): warning C4244: "initialization": conversion from "const T" to "int", possible loss of data C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (323): warning C4244: "argument": conversion from "double" to "T", possible loss of data C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (323): warning C4244: "argument": conversion from "double" to "T", possible loss of data ```
Author
Owner

@mirek-fidler commented on GitHub (Jun 15, 2025):

Hm, VS update broken C++ compiler so I have to let these be for now. Please
remind me again before release... (or sooner)

On Sun, Jun 15, 2025 at 11:44 AM Zbigniew Rębacz @.***>
wrote:

klugier created an issue (ultimatepp/ultimatepp#282)
https://github.com/ultimatepp/ultimatepp/issues/282

Here is the list of warnings while compiling with MSVC, they are mostly
about data loss:

C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (43): warning C4244: "*=": conversion from "double" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (44): warning C4244: "argument": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (50): warning C4244: "initialization": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichEdit\DiagramEditor.cpp (214): warning C4927: illegal conversion; more than one user-defined conversion has been implicitly applied
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (65): warning C4244: "initialization": conversion from "double" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (78): warning C4244: "=": conversion from "double" to "T", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (176): warning C4244: "initialization": conversion from "double" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (200): warning C4244: "argument": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (204): warning C4244: "initialization": conversion from "const T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (323): warning C4244: "argument": conversion from "double" to "T", possible loss of data
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (323): warning C4244: "argument": conversion from "double" to "T", possible loss of data


Reply to this email directly, view it on GitHub
https://github.com/ultimatepp/ultimatepp/issues/282, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARH23ZTFMEIAS3X5RNINVT3DU56XAVCNFSM6AAAAAB7LCVA7GVHI2DSMVQWIX3LMV43ASLTON2WKOZTGE2DOMZQGE2DQNQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

<!-- gh-comment-id:2973624517 --> @mirek-fidler commented on GitHub (Jun 15, 2025): Hm, VS update broken C++ compiler so I have to let these be for now. Please remind me again before release... (or sooner) On Sun, Jun 15, 2025 at 11:44 AM Zbigniew Rębacz ***@***.***> wrote: > *klugier* created an issue (ultimatepp/ultimatepp#282) > <https://github.com/ultimatepp/ultimatepp/issues/282> > > Here is the list of warnings while compiling with MSVC, they are mostly > about data loss: > > C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (43): warning C4244: "*=": conversion from "double" to "int", possible loss of data > C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (44): warning C4244: "argument": conversion from "T" to "int", possible loss of data > C:\Prototable\upp\git\uppsrc\RichEdit\Text.cpp (50): warning C4244: "initialization": conversion from "T" to "int", possible loss of data > C:\Prototable\upp\git\uppsrc\RichEdit\DiagramEditor.cpp (214): warning C4927: illegal conversion; more than one user-defined conversion has been implicitly applied > C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (65): warning C4244: "initialization": conversion from "double" to "int", possible loss of data > C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (78): warning C4244: "=": conversion from "double" to "T", possible loss of data > C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (176): warning C4244: "initialization": conversion from "double" to "int", possible loss of data > C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (200): warning C4244: "argument": conversion from "T" to "int", possible loss of data > C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (204): warning C4244: "initialization": conversion from "const T" to "int", possible loss of data > C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data > C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data > C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (235): warning C4244: "argument": conversion from "T" to "int", possible loss of data > C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (323): warning C4244: "argument": conversion from "double" to "T", possible loss of data > C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (323): warning C4244: "argument": conversion from "double" to "T", possible loss of data > > — > Reply to this email directly, view it on GitHub > <https://github.com/ultimatepp/ultimatepp/issues/282>, or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AARH23ZTFMEIAS3X5RNINVT3DU56XAVCNFSM6AAAAAB7LCVA7GVHI2DSMVQWIX3LMV43ASLTON2WKOZTGE2DOMZQGE2DQNQ> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >
Author
Owner

@klugier commented on GitHub (Sep 19, 2025):

It looks like right now there is less warnings, but still they are present:

C:\Prototable\upp\git\uppsrc\Core\ValueCache.h (50): warning C4267: "return": converting from "size_t" to "int", possible data loss
C:\Prototable\upp\git\uppsrc\Core\ValueCache.h (50): warning C4267: "return": converting from "size_t" to "int", possible data loss
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (167): warning C4244: "argument": converting from "const T" to "T", possible data loss
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (167): warning C4244: "argument": converting from "T" to "T", possible Data loss
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (167): warning C4244: "argument": converting from "const T" to "T", possible data loss
C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (167): warning C4244: "argument": converting from "T" to "T", possible data loss
C:\Prototable\upp\git\uppsrc\Core\ValueCache.h (50): warning C4267: "return": converting from "size_t" to "int", possible data loss
C:\Prototable\upp\git\uppsrc\ide\MainConfig.cpp (113): warning C4805: "==": unsafe combination of type "bool" and type "int" in operation

I think the biggest issue is now with MainConfig.cpp (113). It is related to recent changes from today.

<!-- gh-comment-id:3311198364 --> @klugier commented on GitHub (Sep 19, 2025): It looks like right now there is less warnings, but still they are present: ``` C:\Prototable\upp\git\uppsrc\Core\ValueCache.h (50): warning C4267: "return": converting from "size_t" to "int", possible data loss C:\Prototable\upp\git\uppsrc\Core\ValueCache.h (50): warning C4267: "return": converting from "size_t" to "int", possible data loss C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (167): warning C4244: "argument": converting from "const T" to "T", possible data loss C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (167): warning C4244: "argument": converting from "T" to "T", possible Data loss C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (167): warning C4244: "argument": converting from "const T" to "T", possible data loss C:\Prototable\upp\git\uppsrc\RichText\Diagram.cpp (167): warning C4244: "argument": converting from "T" to "T", possible data loss C:\Prototable\upp\git\uppsrc\Core\ValueCache.h (50): warning C4267: "return": converting from "size_t" to "int", possible data loss C:\Prototable\upp\git\uppsrc\ide\MainConfig.cpp (113): warning C4805: "==": unsafe combination of type "bool" and type "int" in operation ``` I think the biggest issue is now with MainConfig.cpp (113). It is related to recent changes from today.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#89
No description provided.