NUL.o garbage files

Using the VS Code SonarQube plugin this leaves NUL.o files once analyze is done on a file (but perhaps not always(?)). My guess is that this should be deletes automatically, but fails. Is there any fix or WA to get rid of this garbage?

/Mikael

  • Operating system: Win11
  • SonarQube for VS Code plugin version: 4.16.0
  • Programming language you’re coding in: C
  • IAR compiler for ARM
  • Is connected mode used: No

Hello @CytMR, and welcome to Sonar Community,

Which version of the IAR compiler are you using?

We need to probe the compiler to know which set of macros are predefined, the size of built-in types, etc. When doing so, we call the compiler with, among other parameters, --output NUL. Normally, in Windows, NUL is a special device that can be used to discard any data written to it. i.e. there should be no file created!

It seems your version of the IAR compiler appends .o to the parameter we pass, so NUL.o is created, which we do not expect.

Sorry for the delayed answer, for some reason I didn’t receive any notification on your answer. I guess that explains why we see the NUL.o

We are using version 9.60.3 of the IAR tools.

Thanks for the info! I have added a ticket to the backlog

https://sonarsource.atlassian.net/browse/CPP-6192

I had a quick look at their documentation and couldn’t see anything mentioned about the .o being now appended by default, so we will need to try to reproduce ourselves and see if this was changed and at what point.

Hello,
I’ve been in contact with IAR and it seams that this problem is related to Win11.

Using “–output NUL” will generate a NUL.o file with some ~900 byte size while using “–output NUL:” will generate a NUL-file with size 0. All this on Win11

I don’t have a Win10 here but was given a screenshot from IAR showing “-o NUL:” to work as expected (leaving nothing). -o and --output is the same option

2 Likes

Thanks a lot! Very valuable feedback. I have added the information to the ticket.

1 Like