You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/08/18 14:45:53 UTC

[GitHub] [ignite] ivandasch commented on a change in pull request #9341: IGNITE-15332 Fix stringop-truncation warnings. Fix assertions on ODBC…

ivandasch commented on a change in pull request #9341:
URL: https://github.com/apache/ignite/pull/9341#discussion_r691309721



##########
File path: modules/platforms/cpp/odbc-test/include/test_utils.h
##########
@@ -57,6 +57,27 @@
         return; \
     }
 
+/**
+ * Copy std::string to buffer.
+ *
+ * @param dst Destination buffer.
+ * @param src Source std::string.
+ * @param n Copy at most n bytes of src.
+ */
+inline void CopyStringToBuffer(char *dst, const std::string& src, size_t n) {
+    if (n == 0) {
+        return;
+    }
+
+    size_t size = std::min(src.size(), n - 1);
+
+    if (size != n) {

Review comment:
       Yep, sorry




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org