You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the following compiler warning:
```
/home/runner/work/deepmd-kit/deepmd-kit/source/api_c/src/c_api.cc:1336:17: warning: returning address of local temporary object [-Wreturn-stack-address]
return (int*)&(dcm->dcm.sel_types())[0];
^~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
```
by returning the reference of sel_type.
It seems this function is not used anywhere, even in the test, so we don't have an chance to find out if there is possible segfault. (so this warning has no impact)
It seems DeepTensor has returned a reference since the beginning (deepmodeling#137). (perhaps because DeepTensor.sel_types is actually used) DeepTensor and DataChargeModifier have different returned types.
0 commit comments