edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev]  warnings in url.c
@ 2014-02-04 12:39 Karl Dahlke
  0 siblings, 0 replies; 2+ messages in thread
From: Karl Dahlke @ 2014-02-04 12:39 UTC (permalink / raw)
  To: Edbrowse-dev

> size_t variables (which we really need to be using for portability),

Yes, some day, but that is a systemic change
that I'm not ready to make at this time.
For today, and for consistency,
change outPathLen to int and I'm pretty sure all will work.

Karl Dahlke

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Edbrowse-dev] warnings in url.c
@ 2014-02-04 10:51 Adam Thompson
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Thompson @ 2014-02-04 10:51 UTC (permalink / raw)
  To: Edbrowse-dev

Hi,

Following the indent I rebuilt on both 64 and 32 bit machines.
On 32 bit all is fine, but on 64 bit I get the warnings I mentioned before.

These warnings look like:
url.c:551:2: warning: passing argument 1 of ���initString��� from incompatible per type [enabled by default]
  outPath = initString(&outPathLen);
  ^
In file included from eb.h:380:0,
                 from url.c:8:
eb.p:194:7: note: expected ���int *��� but argument is of type ���size_t *��
� char *initString(int *l);

This is because we're using functions which return size_t (64 bits on amd64
with gcc) and passing that to a function which expects an int (32 bits on amd64 with gcc).
Looking through stringfile.c I see lots of these functions,
with the stringAnd* functions using bit operations to (I think)
work out the reallocation amounts. I can sit down and work out if this math
will still work on size_t variables (which we really need to be using for
portability), however would it be possible for someone (Karl)
to explain what the logic really should be?
Also why is this being done with bit operations? Performance?

Cheers,
Adam.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-04 12:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-04 12:39 [Edbrowse-dev] warnings in url.c Karl Dahlke
  -- strict thread matches above, loose matches on Subject: below --
2014-02-04 10:51 Adam Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).