On Thu, Jun 11, 2020 at 10:43 AM Jan Niklas Hasse <jhasse@bixense.com> wrote:
On Wed, 10 Jun 2020, at 23:09, Richard Shaw wrote:
So why does this only show up in MinGW? If a 64bit pointer can't find it a 32bit int, shouldn't I also get an error when building for 64bit Fedora?

Because ShellExecute is a Windows function, thus that part of the code won't be compiled when building for 64 bit Linux.

Well, I guess I meant more generally. I "fixed" a bunch of other "precison" issues for the MinGW build that don't show up in the Fedora build., one example:

@@ -852,7 +852,7 @@ static void xmlrpc_rig_set_pwrmeter(void *data)
  smeter->hide();
  pwrmeter->show();
  }
- int val = reinterpret_cast<long>(data);
+ int val = reinterpret_cast<intptr_t>(data);
  pwrmeter->value(val);
  }

Per my google-fu this needed to be changed because long (or int) isn't guaranteed to be big enough to store a 64bit pointer, but this compiles without warning on Fedora which is on 10.1.1 and later versions of gcc tend to be more pedantic but mingw is on 9.2.1.

Thanks,
Richard