drafter icon indicating copy to clipboard operation
drafter copied to clipboard

Snowcrash build warnings about missing std::move

Open kylef opened this issue 5 years ago • 0 comments

../drafter/ext/snowcrash/src/UriTemplateParser.cc:82:16: warning: local variable 'variableExpression' will be copied despite being returned by name [-Wreturn-std-move]
        return variableExpression;
               ^~~~~~~~~~~~~~~~~~
../drafter/ext/snowcrash/src/UriTemplateParser.cc:82:16: note: call 'std::move' explicitly to avoid copying
        return variableExpression;
               ^~~~~~~~~~~~~~~~~~
               std::move(variableExpression)
../drafter/ext/snowcrash/src/UriTemplateParser.cc:87:16: warning: local variable 'queryStringExpression' will be copied despite being returned by name [-Wreturn-std-move]
        return queryStringExpression;
               ^~~~~~~~~~~~~~~~~~~~~
../drafter/ext/snowcrash/src/UriTemplateParser.cc:87:16: note: call 'std::move' explicitly to avoid copying
        return queryStringExpression;
               ^~~~~~~~~~~~~~~~~~~~~
               std::move(queryStringExpression)
../drafter/ext/snowcrash/src/UriTemplateParser.cc:92:16: warning: local variable 'fragmentExpression' will be copied despite being returned by name [-Wreturn-std-move]
        return fragmentExpression;
               ^~~~~~~~~~~~~~~~~~
../drafter/ext/snowcrash/src/UriTemplateParser.cc:92:16: note: call 'std::move' explicitly to avoid copying
        return fragmentExpression;
               ^~~~~~~~~~~~~~~~~~
               std::move(fragmentExpression)
../drafter/ext/snowcrash/src/UriTemplateParser.cc:97:16: warning: local variable 'reservedExpansionExpression' will be copied despite being returned by name [-Wreturn-std-move]
        return reservedExpansionExpression;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../drafter/ext/snowcrash/src/UriTemplateParser.cc:97:16: note: call 'std::move' explicitly to avoid copying
        return reservedExpansionExpression;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
               std::move(reservedExpansionExpression)
../drafter/ext/snowcrash/src/UriTemplateParser.cc:102:16: warning: local variable 'labelExpansionExpression' will be copied despite being returned by name [-Wreturn-std-move]
        return labelExpansionExpression;
               ^~~~~~~~~~~~~~~~~~~~~~~~
../drafter/ext/snowcrash/src/UriTemplateParser.cc:102:16: note: call 'std::move' explicitly to avoid copying
        return labelExpansionExpression;
               ^~~~~~~~~~~~~~~~~~~~~~~~
               std::move(labelExpansionExpression)
../drafter/ext/snowcrash/src/UriTemplateParser.cc:107:16: warning: local variable 'pathSegmentExpansionExpression' will be copied despite being returned by name [-Wreturn-std-move]
        return pathSegmentExpansionExpression;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drafter/ext/snowcrash/src/UriTemplateParser.cc:107:16: note: call 'std::move' explicitly to avoid copying
        return pathSegmentExpansionExpression;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
               std::move(pathSegmentExpansionExpression)
../drafter/ext/snowcrash/src/UriTemplateParser.cc:112:16: warning: local variable 'pathSegmentExpansionExpression' will be copied despite being returned by name [-Wreturn-std-move]
        return pathSegmentExpansionExpression;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drafter/ext/snowcrash/src/UriTemplateParser.cc:112:16: note: call 'std::move' explicitly to avoid copying
        return pathSegmentExpansionExpression;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
               std::move(pathSegmentExpansionExpression)
../drafter/ext/snowcrash/src/UriTemplateParser.cc:117:16: warning: local variable 'formStyleQueryContinuationExpression' will be copied despite being returned by name [-Wreturn-std-move]
        return formStyleQueryContinuationExpression;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drafter/ext/snowcrash/src/UriTemplateParser.cc:117:16: note: call 'std::move' explicitly to avoid copying
        return formStyleQueryContinuationExpression;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
               std::move(formStyleQueryContinuationExpression)
../drafter/ext/snowcrash/src/UriTemplateParser.cc:122:12: warning: local variable 'undefinedExpression' will be copied despite being returned by name [-Wreturn-std-move]
    return undefinedExpression;
           ^~~~~~~~~~~~~~~~~~~
../drafter/ext/snowcrash/src/UriTemplateParser.cc:122:12: note: call 'std::move' explicitly to avoid copying
    return undefinedExpression;
           ^~~~~~~~~~~~~~~~~~~
           std::move(undefinedExpression)
9 warnings generated.

kylef avatar May 08 '19 12:05 kylef