comparison src/gripes.cc @ 10405:cc69a17ec801

remove integer math warnings
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 09 Mar 2010 08:06:30 +0100
parents 57a59eae83cc
children fd0a3ac60b0e
comparison
equal deleted inserted replaced
10404:b40a5fd3af41 10405:cc69a17ec801
203 warning_with_id ("Octave:logical-conversion", 203 warning_with_id ("Octave:logical-conversion",
204 "value not equal to 1 or 0 converted to logical 1"); 204 "value not equal to 1 or 0 converted to logical 1");
205 } 205 }
206 206
207 void 207 void
208 gripe_truncated_conversion (const char *srctype, const char *desttype)
209 {
210 warning_with_id ("Octave:int-convert-overflow",
211 "data truncated converting from %s to %s",
212 srctype, desttype);
213 }
214
215 void
216 gripe_binop_integer_math_truncated (const char *op, const char *type1, const char *type2)
217 {
218 warning_with_id ("Octave:int-math-overflow",
219 "data truncated for %s by %s binary operator %s",
220 type1, type2, op);
221 }
222
223 void
224 gripe_native_integer_math_truncated (const char *fcn, const char *type)
225 {
226 warning_with_id ("Octave:int-math-overflow",
227 "data truncated for %s native %s operation",
228 type, fcn);
229 }
230
231 void
232 gripe_unop_integer_math_truncated (const char* op, const char *type)
233 {
234 warning_with_id ("Octave:int-math-overflow",
235 "data truncated for the %s unary operator %s", type, op);
236 }
237
238 void
239 gripe_library_execution_error (void) 208 gripe_library_execution_error (void)
240 { 209 {
241 octave_exception_state = octave_no_exception; 210 octave_exception_state = octave_no_exception;
242 211
243 if (! error_state) 212 if (! error_state)
244 error ("caught execution error in library function"); 213 error ("caught execution error in library function");
245 } 214 }
246 215
247 void 216 void
248 gripe_non_integer_conversion (const char *srctype, const char *desttype)
249 {
250 warning_with_id ("Octave:int-convert-non-int-val",
251 "Conversion of non-integer value from %s to %s",
252 srctype, desttype);
253 }
254 void
255 gripe_nan_conversion (const char *srctype, const char *desttype)
256 {
257 warning_with_id ("Octave:int-convert-nan",
258 "Conversion of NaN from %s to %s",
259 srctype, desttype);
260 }
261
262 void
263 gripe_invalid_inquiry_subscript (void) 217 gripe_invalid_inquiry_subscript (void)
264 { 218 {
265 error ("invalid dimension inquiry of a non-existent value"); 219 error ("invalid dimension inquiry of a non-existent value");
266 } 220 }
267 221