Changeset 635774 in git


Ignore:
Timestamp:
Dec 1, 2011, 12:47:44 AM (12 years ago)
Author:
Jan Engelhardt <jengelh@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
5fb90e187708870eec87d901ccccd6786f4fa347
Parents:
0943bdd5f1e662166add7c3fed483d8971bd4108
git-author:
Jan Engelhardt <jengelh@medozas.de>2011-12-01 00:47:44+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-12-13 20:03:46+01:00
Message:
factory/src: silence compile warnings -Wint-to-pointer-cast

Ideally, one should use uintptr_t (from <stdint.h>/<cstdint>), but I
guess some lame compilers may still not have this yet.

imm.h: In function "InternalCF* int2imm(int)":
imm.h:59:45: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
imm.h: In function "InternalCF* int2imm_p(int)":
imm.h:85:44: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
imm.h: In function "InternalCF* int2imm_gf(int)":
imm.h:90:44: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/configure.ac

    r0943bd r635774  
    1313# - initialisation.
    1414#
    15 AC_INIT([factory], [3.1.2.sw])
     15AC_INIT([factory], [3.1.3])
    1616AC_CONFIG_SRCDIR(canonicalform.cc)
    1717AC_CONFIG_MACRO_DIR([../m4])
  • factory/imm.h

    r0943bd r635774  
    5757inline InternalCF * int2imm ( int i )
    5858{
    59     return (InternalCF*)((i << 2) | INTMARK );
     59    return (InternalCF*)(long)((i << 2) | INTMARK );
    6060}
    6161
     
    7474{
    7575    if ( i < 0 )
    76         return (InternalCF*)(-(((-i) << 2) | INTMARK));
    77     else
    78         return (InternalCF*)((i << 2) | INTMARK );
     76        return (InternalCF*)(long)(-(((-i) << 2) | INTMARK));
     77    else
     78        return (InternalCF*)(long)((i << 2) | INTMARK );
    7979}
    8080
     
    8383inline InternalCF * int2imm_p ( int i )
    8484{
    85     return (InternalCF*)((i << 2) | FFMARK );
     85    return (InternalCF*)(long)((i << 2) | FFMARK );
    8686}
    8787
    8888inline InternalCF * int2imm_gf ( int i )
    8989{
    90     return (InternalCF*)((i << 2) | GFMARK );
     90    return (InternalCF*)(long)((i << 2) | GFMARK );
    9191}
    9292//}}}
Note: See TracChangeset for help on using the changeset viewer.