Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1291)

Issue 316163002: Remove unused parameters from test code. (Closed)

Created:
6 years, 6 months ago by Torne
Modified:
6 years, 6 months ago
Reviewers:
Nico
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

Remove unused parameters from test code. Newer versions of the Android build system have -Wunused-params enabled by default. Drop the many unused argc/argv parameters from test C/C++ code and also (void) a parameter in a dummy malloc function. This avoids having to come up with a convoluted way to disable the warning flag in every test. BUG=gyp:433 R=thakis@chromium.org Committed: https://code.google.com/p/gyp/source/detail?r=1938

Patch Set 1 #

Total comments: 1

Patch Set 2 : Use int main(void) instead #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -70 lines) Patch
M test/actions/src/subdir1/program.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/actions/src/subdir3/generate_main.py View 1 1 chunk +1 line, -1 line 0 comments Download
M test/assembly/src/program.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/build-option/hello.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/builddir/src/prog1.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/builddir/src/subdir2/prog2.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/builddir/src/subdir2/subdir3/prog3.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/builddir/src/subdir2/subdir3/subdir4/prog4.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/cflags/cflags.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/compilable/src/program.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M test/configurations/basics/configurations.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/configurations/inheritance/configurations.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/configurations/target_platform/front.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/configurations/x64/configurations.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/cxxflags/cxxflags.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M test/defines-escaping/defines-escaping.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/defines/defines.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/dependency-copy/src/file1.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/dependency-copy/src/file2.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/exclusion/hello.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/external-cross-compile/src/program.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M test/generator-output/actions/subdir1/program.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/generator-output/rules/subdir1/program.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/generator-output/src/prog1.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/generator-output/src/subdir2/deeper/deeper.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/generator-output/src/subdir2/prog2.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/generator-output/src/subdir3/prog3.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/hello/hello.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/hello/hello2.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/home_dot_gyp/src/printfoo.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/include_dirs/src/includes.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/include_dirs/src/subdir/subdir_includes.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/library/src/program.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/link-dependency/mymalloc.c View 1 chunk +1 line, -0 lines 0 comments Download
M test/link-objects/base.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/make/main.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M test/make/noload/main.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/msvs/config_attrs/hello.c View 1 1 chunk +2 lines, -2 lines 0 comments Download
M test/msvs/external_builder/hello.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M test/msvs/list_excluded/hello.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M test/msvs/props/hello.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/msvs/shared_output/hello.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/msvs/shared_output/there/there.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/msvs/uldi2010/hello.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/multiple-targets/src/prog1.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/multiple-targets/src/prog2.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/ninja/chained-dependency/chained.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/product/hello.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/rules-rebuild/src/main.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/rules/src/subdir1/program.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/rules/src/subdir2/program.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/rules/src/subdir3/program.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/rules/src/subdir4/program.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/same-source-file-name/src/prog1.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/same-source-file-name/src/prog2.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/same-source-file-name/src/prog3.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/sibling/src/prog1/prog1.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/sibling/src/prog2/prog2.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/standalone-static-library/prog.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/subdirectory/src/prog1.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/subdirectory/src/subdir/prog2.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/subdirectory/src/subdir/subdir2/prog3.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/toolsets/main.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M test/toplevel-dir/src/sub1/prog1.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/toplevel-dir/src/sub2/prog2.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/variables/latelate/src/program.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M test/win/generator-output-different-drive/prog.c View 1 1 chunk +1 line, -1 line 0 comments Download
M test/win/large-pdb/main.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M test/win/precompiled/hello.c View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Torne
I had a go at running the gyp tests against the latest AOSP (which we'll ...
6 years, 6 months ago (2014-06-05 12:39:02 UTC) #1
Torne
(not intending to land this until gypbot is well again and it can run try ...
6 years, 6 months ago (2014-06-05 12:47:23 UTC) #2
Nico
Seems reasonable. (Do warnings make tests fail?) https://codereview.chromium.org/316163002/diff/1/test/actions/src/subdir1/program.c File test/actions/src/subdir1/program.c (right): https://codereview.chromium.org/316163002/diff/1/test/actions/src/subdir1/program.c#newcode6 test/actions/src/subdir1/program.c:6: int main() ...
6 years, 6 months ago (2014-06-05 16:59:18 UTC) #3
Torne
On 2014/06/05 16:59:18, Nico (away) wrote: > Seems reasonable. > > (Do warnings make tests ...
6 years, 6 months ago (2014-06-05 17:01:03 UTC) #4
Torne
Updated to use int main(void) instead just in case that makes a difference somewhere. :)
6 years, 6 months ago (2014-06-06 09:20:51 UTC) #5
Nico
lgtm
6 years, 6 months ago (2014-06-12 20:14:10 UTC) #6
Torne
6 years, 6 months ago (2014-06-13 09:48:16 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 manually as r1938 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698