source: patches/kbd-1.12-gcc4_fixes-1.patch@ f55549b

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since f55549b was 69cde8d, checked in by Jim Gifford <clfs@…>, 19 years ago

Added: All patches needed for the book.

  • 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.