Snippets for trace-cmd 3.3.1 from Fedora ppc64le
Sourced from https://kojipkgs.fedoraproject.org/packages/trace-cmd/3.3.1/7.fc45/data/logs/ppc64le/build.log.
-
trace-input.c:4458:51: warning: ‘offset’ may be used uninitialized [-Wmaybe-uninitialized] 4458 | handle->cpu_data[cpu].file_offset = offset; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ -
trace-input.c:4460:20: warning: ‘size’ may be used uninitialized [-Wmaybe-uninitialized] 4460 | if (size && (offset + size > handle->total_file_size)) { | ^ -
trace-output.c:2751:13: warning: variable ‘size’ set but not used [-Wunused-but-set-variable=] 2751 | int size = 0; | ^~~~ -
trace-recorder.c:88:25: warning: ignoring return value of ‘ftruncate’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 88 | ftruncate(recorder->fd1, 0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-recorder.c:422:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 422 | write(recorder->fd, buf, recorder->subbuf_size - wrote); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-recorder.c:335:9: warning: ignoring return value of ‘ftruncate’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 335 | ftruncate(fd, 0); | ^~~~~~~~~~~~~~~~ -
trace-util.c:617:9: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 617 | asprintf(&str, "%ld %ld %ld %ld %ld %ld %ld %ld %d", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 618 | ts.tv_sec, ts.tv_nsec, | ~~~~~~~~~~~~~~~~~~~~~~ 619 | sinfo.loads[0], sinfo.loads[1], sinfo.loads[2], | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 620 | sinfo.freeram, sinfo.sharedram, sinfo.freeswap, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 621 | sinfo.procs); | ~~~~~~~~~~~~ -
trace-msg.c:1415:9: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation] 1415 | strncpy(msg.tsync.sync_protocol_name, sync_protocol, TRACECMD_TSYNC_PNAME_LENGTH); | ^ -
trace-timesync.c:84:9: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation] 84 | strncpy(proto->proto_name, proto_name, TRACECMD_TSYNC_PNAME_LENGTH); | ^ -
trace-timesync-ptp.c:415:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 415 | write(ctx->ptp->marker_fd, marker, sizeof(struct ptp_marker)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-timesync-kvm.c:557:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 557 | write(kvm->marker_fd, KVM_EVENT_MARKER, strlen(KVM_EVENT_MARKER) + 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-timesync-kvm.c:293:17: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 293 | asprintf(&vm_dir_str, "%s/%s", kvm_debug_dir(), entry->d_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-timesync-kvm.c:231:66: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Wformat-truncation=] 231 | snprintf(path, sizeof(path), "%s/%s", | ^~ -
trace-timesync-kvm.c:236:66: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Wformat-truncation=] 236 | snprintf(path, sizeof(path), "%s/%s", | ^~ -
trace-timesync-kvm.c:241:66: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Wformat-truncation=] 241 | snprintf(path, sizeof(path), "%s/%s", | ^~ -
trace-record.c:6170:21: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 6170 | ptr = strchr(opts, c); | ^ -
trace-record.c:2629:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 2629 | write(fd, "1", 1); | ^~~~~~~~~~~~~~~~~ -
trace-record.c:1941:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 1941 | write(fd, &zero, 1); | ^~~~~~~~~~~~~~~~~~~ -
trace-record.c:1025:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 1025 | write(fd, " ", 1); | ^~~~~~~~~~~~~~~~~ -
trace-record.c:5081:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5081 | write(tfd, STAMP, 5); | ^~~~~~~~~~~~~~~~~~~~ -
trace-record.c:4920:9: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4920 | read(fd, buf, 1); | ^~~~~~~~~~~~~~~~ -
trace-record.c:2966:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 2966 | write(fd, instance->cpumask, strlen(instance->cpumask)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-record.c:3801:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 3801 | write(fd, V3_CPU, sizeof(V3_CPU)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-record.c:3816:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 3816 | write(fd, V3_MAGIC, sizeof(V3_MAGIC)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-record.c:3697:9: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 3697 | read(msg_handle->fd, buf, 8); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-record.c:3718:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 3718 | write(msg_handle->fd, buf, strlen(buf)+1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-record.c:3724:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 3724 | write(msg_handle->fd, buf, strlen(buf)+1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-record.c:3740:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 3740 | write(msg_handle->fd, "1", 2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-record.c:3742:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 3742 | write(msg_handle->fd, "4", 2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-record.c:3744:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 3744 | write(msg_handle->fd, "TCP", 4); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-record.c:3747:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 3747 | write(msg_handle->fd, "0", 2); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-record.c:1162:17: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 1162 | asprintf(&filter, "(%s)&&(%s)", curr_filter, filter); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-record.c:2421:17: warning: ‘__strncpy_chk’ specified bound depends on the length of the source argument [-Wstringop-truncation] 2421 | strncpy(trigger + 1, line, len); | ^ -
trace-record.c:2491:17: warning: ‘__strncpy_chk’ specified bound depends on the length of the source argument [-Wstringop-truncation] 2491 | strncpy(filter + 1, line, len); | ^ -
trace-record.c:1833:17: warning: ‘strncpy’ specified bound 4352 equals destination size [-Wstringop-truncation] 1833 | strncpy(buf, argv[0], sizeof(buf)); | ^ -
trace-record.c:4213:31: warning: ‘nr_fifos’ may be used uninitialized [-Wmaybe-uninitialized] 4213 | for (i = 0; i < nr_fifos; i++) | ~~^~~~~~~~~~ -
trace-read.c:1962:13: warning: ‘handle’ may be used uninitialized [-Wmaybe-uninitialized] 1962 | if (tracecmd_get_flags(handle) & TRACECMD_FL_RAW_TS) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-read.c:1212:20: warning: ‘ret’ may be used uninitialized [-Wmaybe-uninitialized] 1212 | if (ret > 0) { | ^ -
trace-read.c:1282:65: warning: ‘first_ts’ may be used uninitialized [-Wmaybe-uninitialized] 1282 | tracecmd_add_ts_offset(handles->handle, -first_ts); | ^~~~~~~~~ -
trace-split.c:282:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 282 | write(cpu_data->fd, cpu_data->page, page_size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-split.c:789:61: warning: ‘prev_arg_idx’ may be used uninitialized [-Wmaybe-uninitialized] 789 | if (prev_arg_type != PREV_IS_BUFFER && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ 790 | (prev_arg_idx != optind - 2)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-split.c:570:25: warning: ‘count’ may be used uninitialized [-Wmaybe-uninitialized] 570 | parse_cpu(curr_handle, cpu_data, start, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 571 | end, count, percpu, -1, type, &curr_end_reached); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-listen.c:1012:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 1012 | write(fd, buf, strlen(buf)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-listen.c:356:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 356 | write(fd, "tracecmd", 8); | ^~~~~~~~~~~~~~~~~~~~~~~~ -
trace-listen.c:390:25: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 390 | write(fd, "V3", 3); | ^~~~~~~~~~~~~~~~~~ -
trace-listen.c:395:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 395 | write(fd, "V3", 3); | ^~~~~~~~~~~~~~~~~~ -
trace-listen.c:403:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 403 | write(fd, "OK", 2); | ^~~~~~~~~~~~~~~~~~ -
trace-listen.c:578:25: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 578 | write(msg_handle->fd, buf, strlen(buf)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-listen.c:581:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 581 | write(msg_handle->fd, "\0", 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-listen.c:559:32: warning: ‘pid’ may be used uninitialized [-Wmaybe-uninitialized] 559 | pid_array[cpu] = pid; | ~~~~~~~~~~~~~~~^~~~~ -
trace-profile.c:1709:41: warning: ‘ts_max’ may be used uninitialized [-Wmaybe-uninitialized] 1709 | chain[x].ts_max = ts_max; | ~~~~~~~~~~~~~~~~^~~~~~~~ -
trace-profile.c:1707:41: warning: ‘ts_min’ may be used uninitialized [-Wmaybe-uninitialized] 1707 | chain[x].ts_min = ts_min; | ~~~~~~~~~~~~~~~~^~~~~~~~ -
trace-dump.c:68:25: warning: ‘trace_id’ may be used uninitialized [-Wmaybe-uninitialized] 68 | tracecmd_plog(fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-dump.c:68:25: warning: ‘flags’ may be used uninitialized [-Wmaybe-uninitialized] 68 | tracecmd_plog(fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-dump.c:68:25: warning: ‘cpus’ may be used uninitialized [-Wmaybe-uninitialized] 68 | tracecmd_plog(fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-dump.c:1083:25: warning: ‘rsize’ may be used uninitialized [-Wmaybe-uninitialized] 1083 | read_metadata_strings(fd, rsize); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-vm.c:364:9: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 364 | asprintf(&cmd, "%s %s", VM_CID_CMD, name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-vm.c:487:36: warning: ‘guest’ may be used uninitialized [-Wmaybe-uninitialized] 487 | pid = guest->cpu_pid[i]; | ~~~~~^~~~~~~~~ -
trace-setup-guest.c:108:9: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 108 | fscanf(f, "%d", &nr_cpus); | ^~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-setup-guest.c:135:17: warning: ignoring return value of ‘pwrite’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 135 | pwrite(fd, xml, strlen(xml), 0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trace-sqlhist.c:37:12: warning: ‘name’ may be used uninitialized [-Wmaybe-uninitialized] 37 | if (!name) | ^ -
trace-sqlhist.c:34:32: warning: ‘var’ may be used uninitialized [-Wmaybe-uninitialized] 34 | if ((action & ACTIONS) && !var) | ~~~~~~~~~~~~~~~~~~~^~~~~~~ -
../lib/trace-cmd/trace-output.c:2073:15: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] 2073 | buf = malloc(offset); | ^