Changeset 8d0af8a in buchla-68k


Ignore:
Timestamp:
11/15/2017 08:04:44 PM (6 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
3c45656
Parents:
58ff1a9
Message:

Fixed mixed-type pointer comparisons.

Location:
ram
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • ram/asgvce.c

    r58ff1a9 r8d0af8a  
    7979                DB_CMNT("ne_end - non-step");
    8080
    81                 if (E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
     81                if ((struct n_entry *)E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
    8282
    8383                        DB_CMNT("ne_end - enter note end");
     
    127127                                grp = nelist->group;    /* get group */
    128128
    129                                 if (E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
     129                                if ((struct n_entry *)E_NULL NE
     130                                        (ep = (struct n_entry *)e_alc(E_SIZE1))) {
    130131
    131132                                        DB_CMNT("ne_end - enter note end");
     
    239240                }
    240241
    241                 if (E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
     242                if ((struct n_entry *)E_NULL NE
     243                        (ep = (struct n_entry *)e_alc(E_SIZE1))) {
    242244
    243245                        DB_CMNT("ne_bgn - enter note begin");
  • ram/delnote.c

    r58ff1a9 r8d0af8a  
    104104                                                                cp = (struct n_entry *)cp->e_bak;
    105105
    106                                                         if (p_ctr EQ ep)
     106                                                        if (p_ctr EQ (struct s_entry *)ep)
    107107                                                                p_ctr = p_ctr->e_bak;
    108108
    109                                                         if (p_bak EQ ep)
     109                                                        if (p_bak EQ (struct s_entry *)ep)
    110110                                                                p_bak = p_bak->e_bak;
    111111
    112                                                         if (p_fwd EQ ep)
     112                                                        if (p_fwd EQ (struct s_entry *)ep)
    113113                                                                p_fwd = p_fwd->e_bak;
    114114
    115                                                         if (p_cur EQ ep)
     115                                                        if (p_cur EQ (struct s_entry *)ep)
    116116                                                                p_cur = p_cur->e_bak;
    117117
     
    123123                                                                cp = (struct n_entry *)cp->e_bak;
    124124
    125                                                         if (p_ctr EQ bp)
     125                                                        if (p_ctr EQ (struct s_entry *)bp)
    126126                                                                p_ctr = p_ctr->e_bak;
    127127
    128                                                         if (p_bak EQ bp)
     128                                                        if (p_bak EQ (struct s_entry *)bp)
    129129                                                                p_bak = p_bak->e_bak;
    130130
    131                                                         if (p_fwd EQ bp)
     131                                                        if (p_fwd EQ (struct s_entry *)bp)
    132132                                                                p_fwd = p_fwd->e_bak;
    133133
    134                                                         if (p_cur EQ bp)
     134                                                        if (p_cur EQ (struct s_entry *)bp)
    135135                                                                p_cur = p_cur->e_bak;
    136136
     
    151151                                                                cp = (struct n_entry *)cp->e_bak;
    152152
    153                                                         if (p_ctr EQ bp)
     153                                                        if (p_ctr EQ (struct s_entry *)bp)
    154154                                                                p_ctr = p_ctr->e_bak;
    155155
    156                                                         if (p_bak EQ bp)
     156                                                        if (p_bak EQ (struct s_entry *)bp)
    157157                                                                p_bak = p_bak->e_bak;
    158158
    159                                                         if (p_fwd EQ bp)
     159                                                        if (p_fwd EQ (struct s_entry *)bp)
    160160                                                                p_fwd = p_fwd->e_bak;
    161161
    162                                                         if (p_cur EQ bp)
     162                                                        if (p_cur EQ (struct s_entry *)bp)
    163163                                                                p_cur = p_cur->e_bak;
    164164
     
    215215                        if (EV_BAR EQ ep->e_type) {
    216216
    217                                 if (ep EQ p_bak)
     217                                if (ep EQ (struct n_entry *)p_bak)
    218218                                        p_bak = p_bak->e_bak;
    219219
    220                                 if (ep EQ p_ctr)
     220                                if (ep EQ (struct n_entry *)p_ctr)
    221221                                        p_ctr = p_ctr->e_bak;
    222222
    223                                 if (ep EQ p_cur)
     223                                if (ep EQ (struct n_entry *)p_cur)
    224224                                        p_cur = p_cur->e_bak;
    225225
    226                                 if (ep EQ p_fwd)
     226                                if (ep EQ (struct n_entry *)p_fwd)
    227227                                        p_fwd = p_fwd->e_bak;
    228228
  • ram/localkb.c

    r58ff1a9 r8d0af8a  
    245245                                                lstends[lstendc] = (struct n_entry *)NULL;
    246246
    247                                                 if ((struct n_entry *)NULL EQ ep)
     247                                                if ((struct s_entry *)NULL EQ ep)
    248248                                                        continue;
    249249
     
    271271                                                lstbgns[lstbgnc] = (struct n_entry *)NULL;
    272272
    273                                                 if ((struct n_entry *)NULL EQ ep)
     273                                                if ((struct s_entry *)NULL EQ ep)
    274274                                                        continue;
    275275
  • ram/nedacc.c

    r58ff1a9 r8d0af8a  
    8383        }
    8484
    85         if (E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
     85        if ((struct n_entry *)E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
    8686
    8787#if     DEBUGIT
     
    119119        DB_ENTR("ned_nat");
    120120
    121         if (E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
     121        if ((struct n_entry *)E_NULL NE (ep = (struct n_entry *)e_alc(E_SIZE1))) {
    122122
    123123#if     DEBUGIT
     
    229229                                                        DB_CMNT("nedesub - note begin / fini hit");
    230230
    231                                                         if (E_NULL NE (np = (struct n_entry *)e_alc(E_SIZE1))) {
     231                                                        if ((struct n_entry *)E_NULL NE
     232                                                                (np = (struct n_entry *)e_alc(E_SIZE1))) {
    232233
    233234#if     DEBUGIT
     
    373374                DB_CMNT("ned_mvn - clipping out begin");
    374375
    375                 if (p_bak EQ bp)
     376                if (p_bak EQ (struct s_entry *)bp)
    376377                        p_bak = bp->e_fwd;
    377378
    378                 if (p_ctr EQ bp)
     379                if (p_ctr EQ (struct s_entry *)bp)
    379380                        p_ctr = bp->e_fwd;
    380381
    381                 if (p_cur EQ bp)
     382                if (p_cur EQ (struct s_entry *)bp)
    382383                        p_cur = bp->e_fwd;
    383384
    384                 if (p_fwd EQ bp)
     385                if (p_fwd EQ (struct s_entry *)bp)
    385386                        p_fwd = bp->e_fwd;
    386387
     
    391392                DB_CMNT("ned_mvn - clipping out end");
    392393
    393                 if (p_bak EQ ep)
     394                if (p_bak EQ (struct s_entry *)ep)
    394395                        p_bak = ep->e_fwd;
    395396
    396                 if (p_ctr EQ ep)
     397                if (p_ctr EQ (struct s_entry *)ep)
    397398                        p_ctr = ep->e_fwd;
    398399
    399                 if (p_cur EQ ep)
     400                if (p_cur EQ (struct s_entry *)ep)
    400401                        p_cur = ep->e_fwd;
    401402
    402                 if (p_fwd EQ ep)
     403                if (p_fwd EQ (struct s_entry *)ep)
    403404                        p_fwd = ep->e_fwd;
    404405
     
    422423        } else {
    423424
    424                 if (E_NULL NE fcnote(grp, cnote)) {
     425                if ((struct n_entry *)E_NULL NE fcnote(grp, cnote)) {
    425426
    426427                        notesel = TRUE;                 /* note selected */
     
    430431                } else if (-1 NE (note = accnote())) {
    431432
    432                         if (E_NULL NE (bp = fcnote(grp, note))) {
     433                        if ((struct n_entry *)E_NULL NE
     434                                (bp = fcnote(grp, note))) {
    433435
    434436                                notesel = TRUE;         /* note selected */
     
    475477                DB_CMNT("ned_mvb - clipping out begin");
    476478
    477                 if (p_bak EQ bp)
     479                if (p_bak EQ (struct s_entry *)bp)
    478480                        p_bak = bp->e_fwd;
    479481
    480                 if (p_ctr EQ bp)
     482                if (p_ctr EQ (struct s_entry *)bp)
    481483                        p_ctr = bp->e_fwd;
    482484
    483                 if (p_cur EQ bp)
     485                if (p_cur EQ (struct s_entry *)bp)
    484486                        p_cur = bp->e_fwd;
    485487
    486                 if (p_fwd EQ bp)
     488                if (p_fwd EQ (struct s_entry *)bp)
    487489                        p_fwd = bp->e_fwd;
    488490
     
    502504        } else {
    503505
    504                 if (E_NULL NE fcnote(grp, cnote)) {     /* natural ? */
     506                if ((struct n_entry *)E_NULL NE fcnote(grp, cnote)) {   /* natural ? */
    505507
    506508                        notesel = TRUE;                 /* note selected */
     
    510512                } else if (-1 NE (note = accnote())) {  /* accidental ? */
    511513
    512                         if (E_NULL NE (bp = fcnote(grp, note))) {
     514                        if ((struct n_entry *)E_NULL NE
     515                                (bp = fcnote(grp, note))) {
    513516
    514517                                notesel = TRUE;         /* note selected */
     
    555558                DB_CMNT("ned_mve - clipping out end");
    556559
    557                 if (p_bak EQ ep)
     560                if (p_bak EQ (struct s_entry *)ep)
    558561                        p_bak = ep->e_fwd;
    559562
    560                 if (p_ctr EQ ep)
     563                if (p_ctr EQ (struct s_entry *)ep)
    561564                        p_ctr = ep->e_fwd;
    562565
    563                 if (p_cur EQ ep)
     566                if (p_cur EQ (struct s_entry *)ep)
    564567                        p_cur = ep->e_fwd;
    565568
    566                 if (p_fwd EQ ep)
     569                if (p_fwd EQ (struct s_entry *)ep)
    567570                        p_fwd = ep->e_fwd;
    568571
     
    582585        } else {
    583586
    584                 if (E_NULL NE fcnote(grp, cnote)) {     /* natural ? */
     587                if ((struct n_entry *)E_NULL NE fcnote(grp, cnote)) {   /* natural ? */
    585588
    586589                        notesel = TRUE;                 /* note selected */
     
    590593                } else if (-1 NE (note = accnote())) {
    591594
    592                         if (E_NULL NE (bp = fcnote(grp, note))) {       /* accidental ? */
     595                        if ((struct n_entry *)E_NULL NE
     596                                (bp = fcnote(grp, note))) {     /* accidental ? */
    593597
    594598                                notesel = TRUE;         /* note selected */
  • ram/sedump.c

    r58ff1a9 r8d0af8a  
    403403                n = 8;
    404404
    405                 while (prptr < olda6) {
     405                while (prptr < (int16_t *)olda6) {
    406406
    407407                        printf("  +%-4d [$%08lX]:  $%04.4X\n",
  • ram/sqscan.c

    r58ff1a9 r8d0af8a  
    834834        if (CM_CHR('+')) {      /* output note begin */
    835835
    836                 if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
     836                if ((struct n_entry *)E_NULL EQ
     837                        (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
    837838
    838839                        nospace("note event");
     
    851852        if (CM_CHR('-')) {      /* output note end */
    852853
    853                 if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
     854                if ((struct n_entry *)E_NULL EQ
     855                        (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
    854856
    855857                        nospace("note event");
     
    877879                noteoff = t_cur + ((noteper * noteval) / dvwork);
    878880
    879                 if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
     881                if ((struct n_entry *)E_NULL EQ
     882                        (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
    880883
    881884                        nospace("note event");
     
    885888                p_cur = (struct s_entry *)insnevt(nsp1, EV_NBEG, curgrp, notenum, 64);
    886889
    887                 if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
     890                if ((struct n_entry *)E_NULL EQ
     891                        (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
    888892
    889893                        nospace("note event");
     
    910914        noteoff = t_cur + ((noteval * noteper) / dvwork);
    911915
    912         if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
     916        if ((struct n_entry *)E_NULL EQ
     917                (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
    913918
    914919                nospace("note event");
     
    918923        p_cur = (struct s_entry *)insnevt(nsp1, EV_NBEG, curgrp, notenum, 64);
    919924
    920         if (E_NULL EQ (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
     925        if ((struct n_entry *)E_NULL EQ
     926                (nsp1 = (struct n_entry *)e_alc(E_SIZE1))) {
    921927
    922928                nospace("note event");
Note: See TracChangeset for help on using the changeset viewer.