Changeset a22e8b4 for tests


Ignore:
Timestamp:
Jan 29, 2025, 11:41:32 AM (2 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
161b98e
Parents:
49510db
Message:

Removed the warnings from more tests. I think '(void)var;' might be working better than 'attribute((unused)) var;'.

Location:
tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tests/Makefile.am

    r49510db ra22e8b4  
    9393        concurrency/waituntil/repeat_close \
    9494        concurrency/waituntil/timeout \
    95         designations \
    9695        exceptions/cardgame \
    9796        exceptions/defaults \
    9897        exceptions/defaults-threads \
    9998        exceptions/try-leave-catch \
    100         forall \
    101         function-operator \
    102         gmp \
    103         identParamDeclarator \
    10499        include/includes \
    105100        include/stdincludes \
  • TabularUnified tests/forall.cfa

    r49510db ra22e8b4  
    4040        forall( T, U ) void f( T, U ) { sout | "fTU"; }
    4141
    42         int x;
    43         float y;
    44         int * z;
    45         float * w;
     42        int x = 0;
     43        float y = 0;
     44        int * z = 0;
     45        float * w = 0;
    4646
    4747        f( x, x );
     
    132132                typedef int TD2;
    133133                struct S2 {};
    134                 X RT2( T, X ) {
    135                         int TD2;
     134                X RT2( T, X x ) {
     135                        int TD2; (void)TD2;
     136                        return x;
    136137                }
    137138        }
     
    146147                typedef int TD3;
    147148        }
    148         static {
    149                 struct S5 {};
     149        struct S5 {};
     150        inline {
    150151                void RT5( T ) {
    151152                        struct S6 {};
    152                         int TD2;
     153                        int TD2; (void)TD2;
    153154                }
    154155        }
     
    168169static inline {
    169170        forall( T ) {
    170                 int RT6( T p );
     171                int RT6( T ) { return 0; }
    171172        }
    172173        forall( T, U ) {
    173                 int RT7( T, U );
    174         }
    175 }
    176 static forall( T ) {
    177         int RT8( T );
    178 }
    179 forall( T ) inline static {
     174                int RT7( T, U ) { return 0; }
     175        }
     176}
     177inline forall( T ) {
     178        int RT8( T ) { return 0; }
     179}
     180forall( T ) inline {
    180181        int RT9( T ) { T t; return 3; }
    181182}
     
    226227        &tr += 1;
    227228        tp += 1;
    228         T & tx = tp[1];
     229        T & tx = tp[1]; (void)tx;
    229230
    230231        T t;
     
    239240        &tr += 1;
    240241        tp += 1;
    241         T & tx = tp[1];
     242        T & tx = tp[1]; (void)tx;
    242243}
    243244
    244245forall( T & ) void check_dtype() {
    245         T & tr = *0p;
    246         T * tp = 0p;
     246        T & tr = *0p; (void)tr;
     247        T * tp = 0p; (void)tp;
    247248}
    248249
  • TabularUnified tests/function-operator.cfa

    r49510db ra22e8b4  
    2929trait Destructable { void ^?{}(T &); };
    3030
    31 trait Iterator(iter & | sized(iter) | Copyable(iter) | Destructable(iter), T) {
     31forall(iter & | sized(iter) | Copyable(iter) | Destructable(iter), T)
     32trait Iterator {
    3233        T & *?(iter);
    3334        iter ++?(iter &);
     
    6768forall(Generator, GenRet | { GenRet ?()(Generator &); }, Iter &, T | Iterator(Iter, T) | Assignable(T, GenRet))
    6869void generate(Iter first, Iter last, Generator & gen) {
    69         int i = 0;
    7070        while (first != last) {
    7171                *first = gen();
  • TabularUnified tests/identParamDeclarator.cfa

    r49510db ra22e8b4  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // identParamDeclarator.cfa -- 
    8 // 
     6//
     7// identParamDeclarator.cfa --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed Aug 17 08:37:56 2016
     
    1212// Last Modified On : Fri Sep 25 14:31:08 2020
    1313// Update Count     : 4
    14 //
     14//
     15
     16// We have some useless const qualifiers for parsing testing.
     17#pragma GCC diagnostic ignored "-Wignored-qualifiers"
    1518
    1619int fred (
     
    157160    );
    158161
    159 int main( int argc, char const *argv[] ) {                              // dummy main
     162int main() {
    160163        printf( "done\n" );                                                                     // non-empty .expect file
    161164}
Note: See TracChangeset for help on using the changeset viewer.