Print this page
11972 resync smatch


 143 static ulong_nc_t bad_tocast(unsigned long v)
 144 {
 145         return (ulong_nc_t) v;
 146 }
 147 
 148 static unsigned long bad_fromcast(ulong_nc_t v)
 149 {
 150         return (unsigned long) v;
 151 }
 152 
 153 /*
 154  * check-name: nocast.c
 155  *
 156  * check-error-start
 157 nocast.c:34:33: warning: incorrect type in initializer (different base types)
 158 nocast.c:34:33:    expected unsigned long [nocast] [usertype] *static [toplevel] bad_ptr_to
 159 nocast.c:34:33:    got unsigned long
 160 nocast.c:34:33: warning: implicit cast to nocast type
 161 nocast.c:35:39: warning: incorrect type in initializer (different modifiers)
 162 nocast.c:35:39:    expected unsigned long *static [toplevel] bad_ptr_from
 163 nocast.c:35:39:    got unsigned long [nocast] *<noident>
 164 nocast.c:35:39: warning: implicit cast from nocast type
 165 nocast.c:50:16: warning: implicit cast from nocast type
 166 nocast.c:54:16: warning: implicit cast from nocast type
 167 nocast.c:58:16: warning: implicit cast from nocast type
 168 nocast.c:65:38: warning: implicit cast from nocast type
 169 nocast.c:66:22: warning: implicit cast from nocast type
 170 nocast.c:67:23: warning: implicit cast from nocast type
 171 nocast.c:74:38: warning: implicit cast from nocast type
 172 nocast.c:75:22: warning: implicit cast from nocast type
 173 nocast.c:76:23: warning: implicit cast from nocast type
 174 nocast.c:82:34: warning: incorrect type in initializer (different modifiers)
 175 nocast.c:82:34:    expected unsigned long *bad_mod
 176 nocast.c:82:34:    got unsigned long [nocast] [usertype] *t
 177 nocast.c:82:34: warning: implicit cast from nocast type
 178 nocast.c:83:49: warning: incorrect type in initializer (different type sizes)
 179 nocast.c:83:49:    expected unsigned long long [nocast] *bad_size
 180 nocast.c:83:49:    got unsigned long [nocast] [usertype] *t
 181 nocast.c:83:49: warning: implicit cast to/from nocast type
 182 nocast.c:84:33: warning: incorrect type in initializer (different type sizes)
 183 nocast.c:84:33:    expected short [nocast] *bad_i


 143 static ulong_nc_t bad_tocast(unsigned long v)
 144 {
 145         return (ulong_nc_t) v;
 146 }
 147 
 148 static unsigned long bad_fromcast(ulong_nc_t v)
 149 {
 150         return (unsigned long) v;
 151 }
 152 
 153 /*
 154  * check-name: nocast.c
 155  *
 156  * check-error-start
 157 nocast.c:34:33: warning: incorrect type in initializer (different base types)
 158 nocast.c:34:33:    expected unsigned long [nocast] [usertype] *static [toplevel] bad_ptr_to
 159 nocast.c:34:33:    got unsigned long
 160 nocast.c:34:33: warning: implicit cast to nocast type
 161 nocast.c:35:39: warning: incorrect type in initializer (different modifiers)
 162 nocast.c:35:39:    expected unsigned long *static [toplevel] bad_ptr_from
 163 nocast.c:35:39:    got unsigned long [nocast] *
 164 nocast.c:35:39: warning: implicit cast from nocast type
 165 nocast.c:50:16: warning: implicit cast from nocast type
 166 nocast.c:54:16: warning: implicit cast from nocast type
 167 nocast.c:58:16: warning: implicit cast from nocast type
 168 nocast.c:65:38: warning: implicit cast from nocast type
 169 nocast.c:66:22: warning: implicit cast from nocast type
 170 nocast.c:67:23: warning: implicit cast from nocast type
 171 nocast.c:74:38: warning: implicit cast from nocast type
 172 nocast.c:75:22: warning: implicit cast from nocast type
 173 nocast.c:76:23: warning: implicit cast from nocast type
 174 nocast.c:82:34: warning: incorrect type in initializer (different modifiers)
 175 nocast.c:82:34:    expected unsigned long *bad_mod
 176 nocast.c:82:34:    got unsigned long [nocast] [usertype] *t
 177 nocast.c:82:34: warning: implicit cast from nocast type
 178 nocast.c:83:49: warning: incorrect type in initializer (different type sizes)
 179 nocast.c:83:49:    expected unsigned long long [nocast] *bad_size
 180 nocast.c:83:49:    got unsigned long [nocast] [usertype] *t
 181 nocast.c:83:49: warning: implicit cast to/from nocast type
 182 nocast.c:84:33: warning: incorrect type in initializer (different type sizes)
 183 nocast.c:84:33:    expected short [nocast] *bad_i