My trial by Windows Defender is over

EXpression opf irritation!
Image by prettysleepy1 from Pixabay

There’s nothing wrong with this short C program, which is in my ebook and which I was compiling to test it.

#include <stdio.h>

int main() {

	int a = 10;
	for (int i = 0; i < 5; i++) {
		a--;
		printf("i = %d\n", i);
		if (a == 8) break;
	}
}

Nothing wrong, except Windows Defender went ape-shit every time I compiled it! Talk about annoying. This was in Visual Studio. I’m fairly scrupulous about keeping nasties off my PC but if you believed Defender I had some weird Trojan.

I did a search and found an unanswered question on StackOverflow from someone with the same reported trojan. So I answered it!

Thankfully there was an update from Windows Defender last night and they have quashed this false positive. If the worst came to the worst, I’d hop on to Hyper-V and compile it in Ubuntu or Raspberry Pi OS with clang. But still a bit irritating!

Leave a Reply

Your email address will not be published. Required fields are marked *