source: clfs-sysroot/patches/kbd-1.12-gcc4_fixes-1.patch@ 1fa6ab0

Last change on this file since 1fa6ab0 was 8f3d581, checked in by Joe Ciccone <jciccone@…>, 18 years ago

Add all of the patches needed for clfs-sysroot.

  • Property mode set to 100644
File size: 1.4 KB
  • src/psffontop.c

    Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
    Date: 2005-07-28
    Initial Package Version: 1.12
    Upstream Status: Unknown
    Origin: http://cvs.fedora.redhat.com/viewcvs/devel/kbd/kbd-1.12-alias.patch?rev=1.2&view=markup
    Description: Fix violations of C aliasing rules, triggered by gcc4.
    
    diff -Naur kbd-1.12.orig/src/psffontop.c kbd-1.12/src/psffontop.c
    old new  
    5959
    6060static unsigned int
    6161assemble_ucs2(char **inptr, int cnt) {
    62         unsigned char **in = (unsigned char **) inptr;
    6362        unsigned int u1, u2;
    6463
    6564        if (cnt < 2) {
     
    6867                exit(EX_DATAERR);
    6968        }
    7069
    71         u1 = *(*in)++;
    72         u2 = *(*in)++;
     70        u1 = (unsigned char)*(*inptr)++;
     71        u2 = (unsigned char)*(*inptr)++;
    7372        return (u1 | (u2 << 8));
    7473}
    7574
     
    110109 */
    111110static void
    112111get_uni_entry(char **inptr, char **endptr, struct unicode_list *up, int utf8) {
    113         unsigned char **in = (unsigned char **) inptr;
    114112        unsigned char uc;
    115113        unicode unichar;
    116114        int inseq = 0;
     
    126124                        exit(EX_DATAERR);
    127125                }
    128126                if (utf8) {
    129                         uc = *(*in)++;
     127                        uc = *(*inptr)++;
    130128                        if (uc == PSF2_SEPARATOR)
    131129                                break;
    132130                        if (uc == PSF2_STARTSEQ) {
    133131                                inseq = 1;
    134132                                continue;
    135133                        }
    136                         --(*in);
     134                        --(*inptr);
    137135                        unichar = assemble_utf8(inptr, *endptr - *inptr);
    138136                } else {
    139137                        unichar = assemble_ucs2(inptr, *endptr - *inptr);
Note: See TracBrowser for help on using the repository browser.