Skip to content

removes annoying warning#34

Merged
bast merged 1 commit intodftlibs:masterfrom
scemama:patch-1
May 6, 2019
Merged

removes annoying warning#34
bast merged 1 commit intodftlibs:masterfrom
scemama:patch-1

Conversation

@scemama
Copy link
Copy Markdown
Contributor

@scemama scemama commented May 6, 2019

When compiling, I get a warning:

[ 31%] Building CXX object numgrid/CMakeFiles/numgrid-objects.dir/lebedev/sphere_lebedev_rule.cpp.o
/home/scemama/Downloads/numgrid/numgrid/lebedev/sphere_lebedev_rule.cpp: In function ‘void timestamp()’:
/home/scemama/Downloads/numgrid/numgrid/lebedev/sphere_lebedev_rule.cpp:6483:10: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
   size_t len;
          ^~~

len can be used to check that there was no overflow, and this removes the warning.

Labels:

  • warning

Description

len is now used to check that the buffer was large enough.

Motivation and Context

Warnings are very annoying for users

How Has This Been Tested?

The code was installed, compiled with no warning and the cpp_test program has been run.

Screenshots (if appropriate):

None

Todos

Nothing.

  • Developer Interest
  • None
  • User-Facing for Release Notes
  • None

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Questions

  • None

Status

  • Ready to go

```
[ 31%] Building CXX object numgrid/CMakeFiles/numgrid-objects.dir/lebedev/sphere_lebedev_rule.cpp.o
/home/scemama/Downloads/numgrid/numgrid/lebedev/sphere_lebedev_rule.cpp: In function ‘void timestamp()’:
/home/scemama/Downloads/numgrid/numgrid/lebedev/sphere_lebedev_rule.cpp:6483:10: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
   size_t len;
          ^~~
```
@bast
Copy link
Copy Markdown
Member

bast commented May 6, 2019

Thanks! I am just waiting for restarted CI to finish and then I will merge. Sorry for all the ugly code in there :-)

@bast bast merged commit f2782cb into dftlibs:master May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants