Mercurial > hg > heapstats
changeset 253:1885f234b75b
Bug 3456: Build warnings w/ GCC 7.2.1
Reviewed-by: ykubota
https://github.com/HeapStats/heapstats/pull/121
author | Yasumasa Suenaga <yasuenag@gmail.com> |
---|---|
date | Tue, 31 Oct 2017 16:21:48 +0900 |
parents | 6fd99b983c37 |
children | b65ab2ba6cd8 |
files | ChangeLog agent/src/heapstats-engines/gcWatcher.cpp agent/src/heapstats-engines/jvmSockCmd.cpp agent/src/heapstats-engines/snapShotProcessor.cpp |
diffstat | 4 files changed, 19 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Oct 10 23:39:34 2017 +0900 +++ b/ChangeLog Tue Oct 31 16:21:48 2017 +0900 @@ -1,3 +1,7 @@ +2017-10-31 Yasumasa Suenaga <yasuenag@gmail.com> + + * Bug 3456: Build warnings w/ GCC 7.2.1 + 2017-10-10 KUBOTA Yuji <kubota.yuji@lab.ntt.co.jp> * Bug 3464: Fix launcher and attacher to use on Ubuntu
--- a/agent/src/heapstats-engines/gcWatcher.cpp Tue Oct 10 23:39:34 2017 +0900 +++ b/agent/src/heapstats-engines/gcWatcher.cpp Tue Oct 31 16:21:48 2017 +0900 @@ -1,7 +1,7 @@ /*! * \file gcWatcher.cpp * \brief This file is used to take snapshot when finish garbage collection. - * Copyright (C) 2011-2015 Nippon Telegraph and Telephone Corporation + * Copyright (C) 2011-2017 Nippon Telegraph and Telephone Corporation * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -55,6 +55,8 @@ * \param jni [in] JNI environment object. * \param data [in] Pointer of user data. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-label" void JNICALL TGCWatcher::entryPoint(jvmtiEnv *jvmti, JNIEnv *jni, void *data) { /* Get self. */ TGCWatcher *controller = (TGCWatcher *)data; @@ -92,6 +94,7 @@ /* Change running state. */ controller->_isRunning = false; } +#pragma GCC diagnostic pop /*! * \brief Make and begin Jthread.
--- a/agent/src/heapstats-engines/jvmSockCmd.cpp Tue Oct 10 23:39:34 2017 +0900 +++ b/agent/src/heapstats-engines/jvmSockCmd.cpp Tue Oct 31 16:21:48 2017 +0900 @@ -1,7 +1,7 @@ /*! * \file jvmSockCmd.cpp * \brief This file is used by thread dump. - * Copyright (C) 2011-2015 Nippon Telegraph and Telephone Corporation + * Copyright (C) 2011-2017 Nippon Telegraph and Telephone Corporation * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -305,6 +305,8 @@ * \param pathLen [in] Max length of param "path". * \return Search result. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-truncation" bool TJVMSockCmd::findJvmSock(char* path, int pathLen) { /* Sanity check. */ if (unlikely(path == NULL || pathLen <= 0)) { @@ -357,6 +359,7 @@ return true; } +#pragma GCC diagnostic pop /*! * \brief Create attach file. @@ -364,6 +367,8 @@ * \param pathLen [in] Max length of param "path". * \return Process result. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-truncation" bool TJVMSockCmd::createAttachFile(char* path, int pathLen) { /* Sanity check. */ if (unlikely(path == NULL || pathLen <= 0)) { @@ -425,3 +430,5 @@ return true; } +#pragma GCC diagnostic pop +
--- a/agent/src/heapstats-engines/snapShotProcessor.cpp Tue Oct 10 23:39:34 2017 +0900 +++ b/agent/src/heapstats-engines/snapShotProcessor.cpp Tue Oct 31 16:21:48 2017 +0900 @@ -57,6 +57,8 @@ * \param jni [in] JNI environment information. * \param data [in] Monitor-object for class-container. */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-label" void JNICALL TSnapShotProcessor::entryPoint(jvmtiEnv *jvmti, JNIEnv *jni, void *data) { /* Ranking pointer. */ @@ -137,6 +139,7 @@ /* Change running state. */ controller->_isRunning = false; } +#pragma GCC diagnostic pop /*! * \brief Start parallel work by JThread.