Remove some unused includes in C++ files
[babeltrace.git] / src / plugins / ctf / fs-src / data-stream-file.cpp
index 9a49fd9936878144090c6c43e3fbc5a1993be1c8..698c0129439e27713a02874b39ec6ed3a9bf06a0 100644 (file)
@@ -6,27 +6,29 @@
  * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
  */
 
+#include <glib.h>
+#include <inttypes.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <babeltrace2/babeltrace.h>
+
 #define BT_COMP_LOG_SELF_COMP (self_comp)
 #define BT_LOG_OUTPUT_LEVEL   (log_level)
 #define BT_LOG_TAG            "PLUGIN/SRC.CTF.FS/DS"
 #include "logging/comp-logging.h"
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <inttypes.h>
-#include "compat/mman.h"
+#include "common/assert.h"
 #include "compat/endian.h"
-#include <babeltrace2/babeltrace.h>
-#include "common/common.h"
-#include "file.hpp"
-#include "metadata.hpp"
+#include "compat/mman.h"
+
 #include "../common/msg-iter/msg-iter.hpp"
-#include "common/assert.h"
 #include "data-stream-file.hpp"
-#include <string.h>
+#include "file.hpp"
+#include "fs.hpp"
+#include "lttng-index.hpp"
+#include "plugins/ctf/common/metadata/ctf-meta.hpp"
 
 static inline size_t remaining_mmap_bytes(struct ctf_fs_ds_file *ds_file)
 {
@@ -125,7 +127,7 @@ static enum ctf_msg_iter_medium_status ds_file_mmap(struct ctf_fs_ds_file *ds_fi
     BT_ASSERT(ds_file->mmap_len > 0);
 
     ds_file->mmap_addr =
-        bt_mmap((void *) 0, ds_file->mmap_len, PROT_READ, MAP_PRIVATE, fileno(ds_file->file->fp),
+        bt_mmap(ds_file->mmap_len, PROT_READ, MAP_PRIVATE, fileno(ds_file->file->fp),
                 ds_file->mmap_offset_in_file, ds_file->log_level);
     if (ds_file->mmap_addr == MAP_FAILED) {
         BT_COMP_LOGE("Cannot memory-map address (size %zu) of file \"%s\" (%p) at offset %jd: %s",
@@ -229,7 +231,7 @@ end:
     return status;
 }
 
-static bt_stream *medop_borrow_stream(bt_stream_class *stream_class, int64_t stream_id, void *data)
+static bt_stream *medop_borrow_stream(bt_stream_class *stream_class, int64_t, void *data)
 {
     struct ctf_fs_ds_file *ds_file = (struct ctf_fs_ds_file *) data;
     bt_stream_class *ds_file_stream_class;
@@ -261,7 +263,6 @@ static enum ctf_msg_iter_medium_status medop_seek(off_t offset, void *data)
     return ds_file_mmap(ds_file, offset);
 }
 
-BT_HIDDEN
 struct ctf_msg_iter_medium_ops ctf_fs_ds_file_medops = {
     medop_request_bytes,
     medop_seek,
@@ -390,7 +391,6 @@ end:
     return status;
 }
 
-BT_HIDDEN
 void ctf_fs_ds_group_medops_data_destroy(struct ctf_fs_ds_group_medops_data *data)
 {
     if (!data) {
@@ -849,7 +849,6 @@ error:
     goto end;
 }
 
-BT_HIDDEN
 struct ctf_fs_ds_file *ctf_fs_ds_file_create(struct ctf_fs_trace *ctf_fs_trace, bt_stream *stream,
                                              const char *path, bt_logging_level log_level)
 {
@@ -890,7 +889,6 @@ end:
     return ds_file;
 }
 
-BT_HIDDEN
 struct ctf_fs_ds_index *ctf_fs_ds_file_build_index(struct ctf_fs_ds_file *ds_file,
                                                    struct ctf_fs_ds_file_info *file_info,
                                                    struct ctf_msg_iter *msg_iter)
@@ -911,7 +909,6 @@ end:
     return index;
 }
 
-BT_HIDDEN
 struct ctf_fs_ds_index *ctf_fs_ds_index_create(bt_logging_level log_level,
                                                bt_self_component *self_comp)
 {
@@ -938,7 +935,6 @@ end:
     return index;
 }
 
-BT_HIDDEN
 void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *ds_file)
 {
     if (!ds_file) {
@@ -955,7 +951,6 @@ void ctf_fs_ds_file_destroy(struct ctf_fs_ds_file *ds_file)
     g_free(ds_file);
 }
 
-BT_HIDDEN
 void ctf_fs_ds_index_destroy(struct ctf_fs_ds_index *index)
 {
     if (!index) {
This page took 0.027683 seconds and 4 git commands to generate.