⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bug-477927.c

📁 Small Device C Compiler 面向Inter8051
💻 C
字号:
/* Tests an uninitalised variable bug.   t is not initalised in all paths in the do loop, causing the while   conditional to fail unpredictably.   Doesn't actually test, is really an example. */#include <testfwk.h>typedef unsigned char UBYTE;UBYTErandish(void){  static int count;  if ((++count)&3) {    return 1;  }  else {    return 0;  }}voidspoil(UBYTE ignored){  UNUSED(ignored);}UBYTE accu[2];void testLoopInit(void){  UBYTE t, r;  do {    r = randish();    if(r != 1) {      t = ++accu[r];      spoil(t);    }  }  while(t != 3);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -