ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Пятница
19 июля
14669 Топик полностью
ReAl (17.09.2004 12:28, просмотров: 1) ответил bialix на снова я, фуджик и си: можно каким-то образом указать компилятору, что я не хочу видеть некотрые warning
Ну, чем ему не нравится (void*)0 - не ясно, а на while(1) как и на if(1) многие выдают предупреждения на тему "константа в условии". А для бесконечного цикла стандартно for(;;) именно так, все три пустые: ISO/IEC 9899:1999: 6.8.5.3 The for statement 1 The statement for ( clause-1 ; expression-2 ; expression-3 ) statement behaves as follows: The expression expression-2 is the controlling expression that is evaluated before each execution of the loop body. The expression expression-3 is evaluated as a void expression after each execution of the loop body. If clause-1 is a declaration, the scope of any variables it declares is the remainder of the declaration and the entire loop, including the other two expressions; it is reached in the order of execution before the first evaluation of the controlling expression. If clause-1 is an expression, it is evaluated as a void expression before the first evaluation of the controlling expression.133) 2 Both clause-1 and expression-3 can be omitted. An omitted expression-2 is replaced by a nonzero constant. (выделение моё) и на такое мне ещё ни один компилятор не выдавал предупреждения.