ci/test: unused args for Windows

pull/6284/head
Michael Hirsch, Ph.D 5 years ago committed by Jussi Pakkanen
parent 7d162487e3
commit acee448fb9
  1. 24
      .github/workflows/unusedargs_missingreturn.yml
  2. 2
      test cases/osx/1 basic/main.c
  3. 4
      test cases/osx/2 library versions/exe.orig.c
  4. 2
      test cases/osx/2 library versions/lib.c
  5. 2
      test cases/osx/4 framework/prog.c
  6. 2
      test cases/osx/4 framework/stat.c
  7. 2
      test cases/osx/5 extra frameworks/prog.c
  8. 2
      test cases/osx/5 extra frameworks/stat.c
  9. 2
      test cases/osx/7 bitcode/libbar.mm
  10. 2
      test cases/osx/7 bitcode/libfile.c
  11. 2
      test cases/osx/7 bitcode/libfoo.m
  12. 2
      test cases/osx/8 pie/main.c
  13. 2
      test cases/windows/10 vs module defs generated custom target/prog.c
  14. 2
      test cases/windows/10 vs module defs generated custom target/subdir/somedll.c
  15. 2
      test cases/windows/11 exe implib/prog.c
  16. 5
      test cases/windows/12 resources with custom targets/prog.c
  17. 2
      test cases/windows/13 test argument extra paths/exe/main.c
  18. 5
      test cases/windows/14 resources with custom target depend_files/prog.c
  19. 4
      test cases/windows/15 resource scripts with duplicate filenames/exe3/src_dll/main.c
  20. 2
      test cases/windows/15 resource scripts with duplicate filenames/exe3/src_exe/main.c
  21. 4
      test cases/windows/15 resource scripts with duplicate filenames/exe4/src_dll/main.c
  22. 2
      test cases/windows/15 resource scripts with duplicate filenames/exe4/src_exe/main.c
  23. 4
      test cases/windows/15 resource scripts with duplicate filenames/verify.c
  24. 5
      test cases/windows/16 gui app/gui_prog.c
  25. 5
      test cases/windows/2 winmain/prog.c
  26. 2
      test cases/windows/3 cpp/prog.cpp
  27. 5
      test cases/windows/4 winmaincpp/prog.cpp
  28. 5
      test cases/windows/5 resources/prog.c
  29. 2
      test cases/windows/6 vs module defs/prog.c
  30. 2
      test cases/windows/6 vs module defs/subdir/somedll.c
  31. 2
      test cases/windows/7 dll versioning/lib.c
  32. 2
      test cases/windows/9 vs module defs generated/prog.c
  33. 2
      test cases/windows/9 vs module defs generated/subdir/somedll.c

@ -12,14 +12,17 @@ on:
- "test cases/cmake/**"
- "test cases/common/**"
- "test cases/fortran/**"
- "test cases/platform-linux/**"
- "test cases/linuxlike/**"
- "test caes/windows/**"
pull_request:
paths:
- ".github/workflows/unusedargs_missingreturn.yml"
- "test cases/cmake/**"
- "test cases/common/**"
- "test cases/fortran/**"
- "test cases/platform-linux/**"
- "test cases/linuxlike/**"
- "test caes/windows/**"
jobs:
@ -39,3 +42,20 @@ jobs:
CFLAGS: "-Werror=unused-parameter -Werror=return-type -Werror=strict-prototypes"
CPPFLAGS: "-Werror=unused-parameter -Werror=return-type"
FFLAGS: "-fimplicit-none"
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- run: pip install ninja
- run: python run_project_tests.py --only platform-windows
env:
CFLAGS: "-Werror=unused-parameter -Werror=return-type -Werror=strict-prototypes"
CPPFLAGS: "-Werror=unused-parameter -Werror=return-type"
FFLAGS: "-fimplicit-none"
CC: gcc
CXX: g++
FC: gfortran

@ -1,5 +1,5 @@
#include <CoreFoundation/CoreFoundation.h>
int main(int argc, char **argv) {
int main(void) {
return 0;
}

@ -1,8 +1,6 @@
int myFunc (void);
int
main (int argc, char *argv[])
{
int main (void) {
if (myFunc() == 55)
return 0;
return 1;

@ -1,3 +1,3 @@
int myFunc() {
int myFunc(void) {
return 55;
}

@ -1,3 +1,3 @@
int main(int argc, char **argv) {
int main(void) {
return 0;
}

@ -1 +1 @@
int func() { return 933; }
int func(void) { return 933; }

@ -1,3 +1,3 @@
int main(int argc, char **argv) {
int main(void) {
return 0;
}

@ -1 +1 @@
int func() { return 933; }
int func(void) { return 933; }

@ -1,7 +1,7 @@
#import <stdio.h>
#import "vis.h"
int EXPORT_PUBLIC libbar(int arg) {
int EXPORT_PUBLIC libbar(void) {
return 0;
}

@ -1,5 +1,5 @@
#include "vis.h"
int EXPORT_PUBLIC libfunc() {
int EXPORT_PUBLIC libfunc(void) {
return 3;
}

@ -1,7 +1,7 @@
#import <stdio.h>
#import "vis.h"
int EXPORT_PUBLIC libfoo(int arg) {
int EXPORT_PUBLIC libfoo(void) {
return 0;
}

@ -1,5 +1,5 @@
#include <CoreFoundation/CoreFoundation.h>
int main(int argc, char **argv) {
int main(void) {
return 0;
}

@ -1,4 +1,4 @@
int somedllfunc();
int somedllfunc(void);
int main(void) {
return somedllfunc() == 42 ? 0 : 1;

@ -1,3 +1,3 @@
int somedllfunc() {
int somedllfunc(void) {
return 42;
}

@ -1,6 +1,6 @@
#include <windows.h>
int __declspec(dllexport)
main() {
main(void) {
return 0;
}

@ -10,5 +10,10 @@ WinMain(
int nCmdShow) {
HICON hIcon;
hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(MY_ICON));
// avoid unused argument error while matching template
((void)hInstance);
((void)hPrevInstance);
((void)lpszCmdLine);
((void)nCmdShow);
return hIcon ? 0 : 1;
}

@ -1,5 +1,5 @@
#include <foo.h>
int main(int ac, char **av) {
int main(void) {
return foo_process();
}

@ -10,5 +10,10 @@ WinMain(
int nCmdShow) {
HICON hIcon;
hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(MY_ICON));
// avoid unused argument error while matching template
((void)hInstance);
((void)hPrevInstance);
((void)lpszCmdLine);
((void)nCmdShow);
return hIcon ? 0 : 1;
}

@ -2,5 +2,9 @@
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
// avoid unused argument error while matching template
((void)hinstDLL);
((void)fdwReason);
((void)lpvReserved);
return TRUE;
}

@ -1,3 +1,3 @@
int main(int argc, char **argv) {
int main(void) {
return 0;
}

@ -2,5 +2,9 @@
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
// avoid unused argument error while matching template
((void)hinstDLL);
((void)fdwReason);
((void)lpvReserved);
return TRUE;
}

@ -1,3 +1,3 @@
int main(int argc, char **argv) {
int main(void) {
return 0;
}

@ -1,7 +1,7 @@
#include <assert.h>
#include <windows.h>
int main(int arc, char *argv[])
int main(int argc, char *argv[])
{
// verify that the expected resource exists and has the expected contents
HRSRC hRsrc;
@ -9,6 +9,8 @@ int main(int arc, char *argv[])
HGLOBAL hGlobal;
void* data;
((void)argc);
hRsrc = FindResource(NULL, argv[1], RT_RCDATA);
assert(hRsrc);

@ -2,5 +2,10 @@
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
// avoid unused argument error while matching template
((void)hInstance);
((void)hPrevInstance);
((void)lpCmdLine);
((void)nCmdShow);
return 0;
}

@ -6,5 +6,10 @@ WinMain(
HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow) {
// avoid unused argument error while matching template
((void)hInstance);
((void)hPrevInstance);
((void)lpszCmdLine);
((void)nCmdShow);
return 0;
}

@ -2,6 +2,6 @@
class Foo;
int main(int argc, char **argv) {
int main(void) {
return 0;
}

@ -8,5 +8,10 @@ WinMain(
HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow) {
// avoid unused argument error while matching template
((void)hInstance);
((void)hPrevInstance);
((void)lpszCmdLine);
((void)nCmdShow);
return 0;
}

@ -12,5 +12,10 @@ WinMain(
int nCmdShow) {
HICON hIcon;
hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(MY_ICON));
// avoid unused argument error while matching template
((void)hInstance);
((void)hPrevInstance);
((void)lpszCmdLine);
((void)nCmdShow);
return hIcon ? 0 : 1;
}

@ -1,4 +1,4 @@
int somedllfunc();
int somedllfunc(void);
int main(void) {
return somedllfunc() == 42 ? 0 : 1;

@ -1,3 +1,3 @@
int somedllfunc() {
int somedllfunc(void) {
return 42;
}

@ -1,6 +1,6 @@
#ifdef _WIN32
__declspec(dllexport)
#endif
int myFunc() {
int myFunc(void) {
return 55;
}

@ -1,4 +1,4 @@
int somedllfunc();
int somedllfunc(void);
int main(void) {
return somedllfunc() == 42 ? 0 : 1;

@ -1,3 +1,3 @@
int somedllfunc() {
int somedllfunc(void) {
return 42;
}

Loading…
Cancel
Save