Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
e59ef25b
Commit
e59ef25b
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Removed shadowed variables and added compiler flag to prevent their appearance.
parent
d0033162
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
configure.ac
+1
-1
1 addition, 1 deletion
configure.ac
src/queue.c
+2
-2
2 additions, 2 deletions
src/queue.c
tests/test125cells.c
+2
-2
2 additions, 2 deletions
tests/test125cells.c
with
5 additions
and
5 deletions
configure.ac
+
1
−
1
View file @
e59ef25b
...
...
@@ -466,7 +466,7 @@ if test "$enable_warn" != "no"; then
# We will do this by hand instead and only default to the macro for unknown compilers
case "$ax_cv_c_compiler_vendor" in
gnu | clang)
CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter"
CFLAGS="$CFLAGS -Wall -Wextra
-Wshadow
-Wno-unused-parameter"
;;
intel)
CFLAGS="$CFLAGS -w2 -Wunused-variable"
...
...
This diff is collapsed.
Click to expand it.
src/queue.c
+
2
−
2
View file @
e59ef25b
...
...
@@ -188,7 +188,7 @@ struct task *queue_gettask(struct queue *q, const struct task *prev,
/* Set some pointers we will use often. */
int
*
qtid
=
q
->
tid
;
struct
task
*
qtasks
=
q
->
tasks
;
const
int
qcount
=
q
->
count
;
const
int
old_
qcount
=
q
->
count
;
/* Data for the sliding window in which to try the task with the
best overlap with the previous task. */
...
...
@@ -201,7 +201,7 @@ struct task *queue_gettask(struct queue *q, const struct task *prev,
int
ind
=
-
1
;
/* Loop over the queue entries. */
for
(
int
k
=
0
;
k
<
qcount
;
k
++
)
{
for
(
int
k
=
0
;
k
<
old_
qcount
;
k
++
)
{
if
(
k
<
queue_search_window
)
{
window
[
window_count
].
ind
=
k
;
window
[
window_count
].
tid
=
qtid
[
k
];
...
...
This diff is collapsed.
Click to expand it.
tests/test125cells.c
+
2
−
2
View file @
e59ef25b
...
...
@@ -564,7 +564,7 @@ int main(int argc, char *argv[]) {
/* Start the test */
ticks
time
=
0
;
for
(
size_t
i
=
0
;
i
<
runs
;
++
i
)
{
for
(
size_t
n
=
0
;
n
<
runs
;
++
n
)
{
const
ticks
tic
=
getticks
();
...
...
@@ -642,7 +642,7 @@ int main(int argc, char *argv[]) {
time
+=
toc
-
tic
;
/* Dump if necessary */
if
(
i
==
0
)
{
if
(
n
==
0
)
{
sprintf
(
outputFileName
,
"swift_dopair_125_%s.dat"
,
outputFileNameExtension
);
dump_particle_fields
(
outputFileName
,
main_cell
,
solution
,
0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment