Warning on OSX

61 views
Skip to first unread message

Igor Korot

unread,
Jan 30, 2022, 10:56:42 PM1/30/22
to wx-dev
Hi,
I am having a following on the Xcode 9.4.1 on the OSX 10.13.6 compiling
my application with wxWidgets 3.1.5:

[code]
filefn.h
Implicit conversion loses integer precision size_t (aka long) to int
In file included from wxWidgets/include/wx/wx.h:24
In file included from wxWidgets/include/wx/event.h:22
In file included from wxWidgets/include/wx/cursor.h:69
In file included from wxWidgets/include/wx/cursor.h:14
In file included from wxWidgets/include/wx/bitmap.h:21
In file included from wxWidgets/include/wx/image.h:23
In file included from wxWidgets/include/wx/stream.h:21
Expanded from macro 'wxCRT_Readlink'
[/code]

Library was compiled cleanly from the Terminal with

../configure --enable-debug --enable-debug_gdb --with-cocoa --with-cxx=11

I don't see this warning on either Windows or GTK.

Thank you.

PB

unread,
Jan 31, 2022, 9:17:45 AM1/31/22
to wx-dev
Hi,

Did you try with the master, to see if it was not fixed by this or similar:

Regards,
PB

Igor Korot

unread,
Jan 31, 2022, 9:56:37 AM1/31/22
to wx-dev
Hi, PB,

No.
I'm developing based on the release.

I'll wait for 3.1.6/3.2.0.

Thank you.


Regards,
PB

--
You received this message because you are subscribed to the Google Groups "wx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-dev/3cec60bb-bd0c-4062-ba8a-3c883effda42n%40googlegroups.com.

PB

unread,
Jan 31, 2022, 3:37:26 PM1/31/22
to wx-dev
Hi,

I believe that when reporting an issue with an older release, an attempt should be made to check whether the issue can still be reproduced in the current master. Even more so, when the signature of the function causing the issue has changed and all the testing needed is just to run the build...

Regards,
PB

Lauri Nurmi

unread,
Jan 31, 2022, 5:51:06 PM1/31/22
to wx-...@googlegroups.com
Igor Korot kirjoitti 31.1.2022 klo 16:56:
Hi, PB,

On Mon, Jan 31, 2022, 08:18 PB <pbfo...@gmail.com> wrote:
Hi,

Did you try with the master, to see if it was not fixed by this or similar:

No.
I'm developing based on the release.

I'll wait for 3.1.6/3.2.0.

So you consider it is better to ask for help from others (for free) for trivial things like this, and not put any effort yourself in finding out whether you are reporting a problem that is already fixed? How do you justify that?


Igor Korot

unread,
Jan 31, 2022, 6:39:56 PM1/31/22
to wx-dev
Hi, Lauri,
My E-mail was not directed to ask for help.
It was rather directed to say that this is what I observe and I didn't
see the same behavior on the other platforms.

And so I was very confused because at least on *nix/GTK this warning
should've been produced.

Thank you.

>
>
> --
> You received this message because you are subscribed to the Google Groups "wx-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wx-dev+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/wx-dev/72ca6575-5765-deba-1e94-42642e6771d8%40iki.fi.

Igor Korot

unread,
Jul 10, 2022, 11:47:04 AM7/10/22
to wx-dev
Hi,
The warnings in question are no longer happening.

However I (still) have the same warning from stc.h:

[code]
virtual long XYToPosition(long x, long y) const wxOVERRIDE
{
long pos = PositionFromLine((int)y);
if ( pos == -1 )
return -1;

if ( x >= LineLength(y) ) // in this line
return -1;

pos += x;
return pos;
}
[/code]

Thank you.

Dan Korn

unread,
Oct 3, 2025, 1:54:56 PM (3 days ago) Oct 3
to wx-dev
This is still an issue in the latest stc.h on GitHub.  In both XYToPosition and PositionToXY, a long is passed to LineLength, which takes int.

Dan

Vadim Zeitlin

unread,
Oct 4, 2025, 8:41:49 AM (2 days ago) Oct 4
to wx-...@googlegroups.com
On Fri, 3 Oct 2025 10:54:56 -0700 (PDT) Dan Korn wrote:

DK> This is still an issue in the latest stc.h on GitHub. In both XYToPosition
DK> and PositionToXY, a long is passed to LineLength, which takes int.

Sorry, I don't understand what do you mean. I see explicit cast to int in
XYToPosition() and PositionToXY() passes an int to LineLength() anyhow.
What warning exactly are you getting and with which version of wx?

Regards,
VZ
Reply all
Reply to author
Forward
0 new messages