Fix warnings on non-x86_64 systems
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 16 Apr 2021 21:09:27 +0000 (17:09 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 19 Apr 2021 17:33:41 +0000 (13:33 -0400)
Change-Id: I1043786d066576c91ef5a62bf45e890e870c4454
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/common/counter/shm.c
src/common/hash.h
src/common/ringbuffer/shm.c
src/lib/lttng-ust/lttng-context-perf-counters.c
src/lib/lttng-ust/rculfhash.c

index e421d045c991a02be48e655a044c42d30d0c2491..8b65d1fc6137dcb80dafbe5c39689ed8c5010c29 100644 (file)
@@ -192,11 +192,19 @@ static bool lttng_is_numa_available(void)
 }
 #endif
 
+#ifdef HAVE_LIBNUMA
 struct lttng_counter_shm_object *lttng_counter_shm_object_table_alloc(struct lttng_counter_shm_object_table *table,
                        size_t memory_map_size,
                        enum lttng_counter_shm_object_type type,
                        int cpu_fd,
                        int cpu)
+#else
+struct lttng_counter_shm_object *lttng_counter_shm_object_table_alloc(struct lttng_counter_shm_object_table *table,
+                       size_t memory_map_size,
+                       enum lttng_counter_shm_object_type type,
+                       int cpu_fd,
+                       int cpu __attribute__((unused)))
+#endif
 {
        struct lttng_counter_shm_object *shm_object;
 #ifdef HAVE_LIBNUMA
index c3ffc18d032eb2bb47d862e6e96a8a3b661d1a44..5002915ead01784ab9ccb58a2d5e1e4fed5c7915 100644 (file)
@@ -69,8 +69,8 @@ uint32_t lttng_hash_u32(
 
        /*----------------------------------- handle the last 3 uint32_t's */
        switch (length) {       /* all the case statements fall through */
-       case 3: c += k[2];
-       case 2: b += k[1];
+       case 3: c += k[2];      /* fall through */
+       case 2: b += k[1];      /* fall through */
        case 1: a += k[0];
                final(a, b, c);
        case 0:                 /* case 0: nothing left to add */
index 8be7e359ea30ab4c7dec5b642ccc5b122e5745c6..a3235b6961ad6e0b6c13677c84bd78bb5207b954 100644 (file)
@@ -264,11 +264,19 @@ static bool lttng_is_numa_available(void)
 }
 #endif
 
+#ifdef HAVE_LIBNUMA
 struct shm_object *shm_object_table_alloc(struct shm_object_table *table,
                        size_t memory_map_size,
                        enum shm_object_type type,
                        int stream_fd,
                        int cpu)
+#else
+struct shm_object *shm_object_table_alloc(struct shm_object_table *table,
+                       size_t memory_map_size,
+                       enum shm_object_type type,
+                       int stream_fd,
+                       int cpu __attribute__((unused)))
+#endif
 {
        struct shm_object *shm_object;
 #ifdef HAVE_LIBNUMA
index e6833ecdf53d8ed16c042d853a522396eb816d58..328980c486d13db75703db9205c685523425427d 100644 (file)
@@ -262,7 +262,7 @@ uint64_t arch_read_perf_counter(
 }
 
 static
-int arch_perf_keep_fd(struct lttng_perf_counter_thread_field *thread_field)
+int arch_perf_keep_fd(struct lttng_perf_counter_thread_field *thread_field __attribute__((unused)))
 {
        return 1;
 }
index de90d71051133d129fd39cfeab927a6aa3bb8b1a..a03f44211a7055a1f883b112026ffd93c94bec0c 100644 (file)
@@ -1006,7 +1006,7 @@ const struct lttng_ust_lfht_mm_type *get_mm_type(unsigned long max_nr_buckets)
  * For 32-bit architectures, use the order allocator.
  */
 static
-const struct lttng_ust_lfht_mm_type *get_mm_type(unsigned long max_nr_buckets)
+const struct lttng_ust_lfht_mm_type *get_mm_type(unsigned long max_nr_buckets __attribute__((unused)))
 {
        return &lttng_ust_lfht_mm_order;
 }
This page took 0.02832 seconds and 4 git commands to generate.