diff options
author | Gihun Chang <gihun.chang@samsung.com> | 2017-08-01 11:46:09 +0900 |
---|---|---|
committer | Gihun Chang <gihun.chang@samsung.com> | 2017-08-01 11:47:48 +0900 |
commit | b6b8f39c220dd86ab066c34884518b5b6680a3be (patch) | |
tree | 05c363e9210ac8fd1f2a0fa948b98efbe258ba7d | |
parent | 588065a62fe0082484d4763f7775f69a6bdfd942 (diff) | |
download | ttrace-b6b8f39c220dd86ab066c34884518b5b6680a3be.tar.gz ttrace-b6b8f39c220dd86ab066c34884518b5b6680a3be.tar.bz2 ttrace-b6b8f39c220dd86ab066c34884518b5b6680a3be.zip |
Remove build warnings with GCC 6.2submit/tizen_4.0_unified/20170814.115522submit/tizen_4.0/20170828.100009submit/tizen_4.0/20170814.115522submit/tizen_4.0/20170811.094300submit/tizen/20170801.044617accepted/tizen/unified/20170803.010335accepted/tizen/4.0/unified/20170828.223019accepted/tizen/4.0/unified/20170816.015423
*For implicit declaration of function [-Wimplicit-function-declaration]
. Add #include <stdio.h> prior to use of the function vsnprintf.
*For Unused bariable [-Wunused-variable]
. Remove it. Really Unused.
. bufSize, buf, ret
*For Ignoring return value of func() [-Wunused-result]
. Remove the use of function by https://review.tizen.org/gerrit/#/c/124677/
Change-Id: I7e376cfc30078832141128d10b2e44cd598b9b56
-rwxr-xr-x | src/atrace/atrace.cpp | 14 | ||||
-rwxr-xr-x | src/trace.c | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/atrace/atrace.cpp b/src/atrace/atrace.cpp index 99176bb..324d4da 100755 --- a/src/atrace/atrace.cpp +++ b/src/atrace/atrace.cpp @@ -365,12 +365,8 @@ static bool setTagsProperty(uint64_t tags) uint64_t *sm_for_enabled_tag = NULL; int fd = -1; -//atrace "--init_exec" mode + // atrace "--init_exec" mode if(g_init_exec) { - size_t bufSize = DEF_GR_SIZE; - char buf[DEF_GR_SIZE]; - int ret = 0; - if(fileExists(ENABLED_TAG_FILE)) { fprintf(stderr, "[Info] T-trace has been already initailized\n"); return false; //atrace has been already initailized. @@ -424,7 +420,7 @@ static bool setTagsProperty(uint64_t tags) } } } -//atrace normal mode + // atrace normal mode else { fd = open(ENABLED_TAG_FILE, O_RDWR | O_CLOEXEC, 0666); if(fd < 0){ @@ -440,7 +436,7 @@ static bool setTagsProperty(uint64_t tags) *sm_for_enabled_tag = tags; } // For debug - //fprintf(stderr, "Enabled TAGs: %u\n", (uint32_t)*sm_for_enabled_tag); + // fprintf(stderr, "Enabled TAGs: %u\n", (uint32_t)*sm_for_enabled_tag); // munmap(sm_for_enabled_tag, sizeof(uint64_t)); close(fd); @@ -542,7 +538,7 @@ static bool setUpTrace() excludedTags |= TTRACE_TAG_ALWAYS; tags &= ~excludedTags; } - printf("Tags: 0x%llx, excludedTags: 0x%llx\n", tags, excludedTags); + printf("Tags: 0x%lx, excludedTags: 0x%lx\n", tags, excludedTags); } ok &= startTrace(); @@ -818,6 +814,8 @@ int main(int argc, char **argv) bool traceStart = true; bool traceStop = true; bool traceDump = true; + + // Global Variable Initialization excludedTags = 0ULL; if (argc == 2 && 0 == strcmp(argv[1], "--help")) { diff --git a/src/trace.c b/src/trace.c index 59826ef..a4f8fcd 100755 --- a/src/trace.c +++ b/src/trace.c @@ -15,6 +15,8 @@ * limitations under the License. */ +#include <stdio.h> + #include "ttrace.h" #include "stdarg.h" |