edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] warnings in url.c
Date: Tue, 4 Feb 2014 10:51:30 +0000	[thread overview]
Message-ID: <20140204105130.GH32200@toaster.adamthompson.me.uk> (raw)

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.

             reply	other threads:[~2014-02-04 10:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04 10:51 Adam Thompson [this message]
2014-02-04 12:39 Karl Dahlke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140204105130.GH32200@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).