[sr #107538] Patch: "warning: cast to pointer from integer of different size"

Jeffrey Walton INVALID.NOREPLY at gnu.org
Wed Nov 24 19:14:40 CET 2010


URL:
  <http://savannah.gnu.org/support/?107538>

                 Summary: Patch: "warning: cast to pointer from integer of
different size"
                 Project: GnuTLS
            Submitted by: noloader
            Submitted on: Wed 24 Nov 2010 06:14:39 PM GMT
                Category: None
                Priority: 5 - Normal
                Severity: 2 - Minor
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

>From the low hanging fruit department.....

This clears about 50 instances (give or take) of "warning: cast to pointer
from integer of different size". I believe the warning only showed up on x64
systems.

gnutls_transport_ptr_t is typedef'd as a void*, while a file descriptor is a
[fixed sized] int. OK on x86, warning on x64.

Previous:
    gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);

Proposed:
    gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t)
(ssize_t)sd);




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 24 Nov 2010 06:14:39 PM GMT  Name: pointer-from-integer.patch 
Size: 19kB   By: noloader

<http://savannah.gnu.org/support/download.php?file_id=22098>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/support/?107538>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





More information about the Gnutls-devel mailing list