Search notes:

cl: pragma warning push/pop

#pragma warning(push) followed by a #pragma warning(disable: …) can be used to prevent the compiler from issuing a warning until the suspension is nullified again with #pragma warning(pop).
For example, if a c program is compiled with /W4, it would warn with warning C4100 if a function parameter is not referenced. In the following example, this warning is inhibited with the necessary #pragma.
#include <stdio.h>

int num() {
  return 42;
}

#pragma warning(push)
#pragma warning(disable: 4100)
int main(int argc, char *argv[]) {
  printf("Hello world, the numer is %d\n", num());
}
#pragma warning(pop)
Github repository about-cl, path: /pragma/warning/push-pop/disable/prog.c
The program can be compiled with this Makefile:
.SILENT:

prog.exe: prog.obj
	link /nologo prog.obj /out:prog.exe

prog.obj: prog.c
	cl /nologo /W4 /c prog.c /Foprog.obj
Github repository about-cl, path: /pragma/warning/push-pop/disable/Makefile

See also

cl

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1745822215, '18.189.186.244', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/development/Visual-Studio/cl/pragma/warning/push-pop(66): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78