]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix various clang warnings
authorPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 25 Aug 2023 21:00:58 +0000 (23:00 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 25 Aug 2023 21:00:58 +0000 (23:00 +0200)
Mostly missing 'void' in function prototypes.

17 files changed:
VEX/priv/guest_mips_helpers.c
cachegrind/cg_arch.c
callgrind/bb.c
callgrind/bbcc.c
callgrind/callstack.c
callgrind/context.c
callgrind/dump.c
callgrind/fn.c
callgrind/sim.c
callgrind/threads.c
coregrind/m_debuginfo/readpdb.c
coregrind/m_gdbserver/target.c
drd/drd_bitmap.c
drd/drd_load_store.c
drd/drd_thread.c
drd/drd_vc.c
drd/drd_vc.h

index 5845e483e46713b5458d31134714198daef2e3da..74cfb9c34caa2bad76124397f74037b8e5bc113b 100644 (file)
@@ -1274,7 +1274,7 @@ extern UInt mips_dirtyhelper_calculate_MSACSR ( void* gs, UInt ws, UInt wt,
    return ret;
 }
 
-extern UInt mips_dirtyhelper_get_MSAIR() {
+extern UInt mips_dirtyhelper_get_MSAIR(void) {
    UInt ret = 0;
 /* GCC 4.8 and later support MIPS MSA. */
 #if defined(__mips__) && (defined(__clang__) || (GCC_VERSION >= 408))
index 6ff2247e84367dd97b3a08333335f57d68de7f1a..8858b0ee6da8607e1559d77daa90d7d81298d2c7 100644 (file)
@@ -311,7 +311,7 @@ void VG_(post_clo_init_configure_caches)(cache_t* I1c,
 #undef DEFINED
 }
 
-void VG_(print_cache_clo_opts)()
+void VG_(print_cache_clo_opts)(void)
 {
    VG_(printf)(
 "    --I1=<size>,<assoc>,<line_size>  set I1 cache manually\n"
index da64caa13e6fbfd03e1683e7b67e7eb8193b6f4d..a599c10a5569d073f5a215f541f4e52dd3e695f3 100644 (file)
@@ -33,7 +33,7 @@
 /* BB hash, resizable */
 bb_hash bbs;
 
-void CLG_(init_bb_hash)()
+void CLG_(init_bb_hash)(void)
 {
    Int i;
 
@@ -45,7 +45,7 @@ void CLG_(init_bb_hash)()
    for (i = 0; i < bbs.size; i++) bbs.table[i] = NULL;
 }
 
-bb_hash* CLG_(get_bb_hash)()
+bb_hash* CLG_(get_bb_hash)(void)
 {
   return &bbs;
 }
index 619d400019f0ee3468471f5c053c015833f37d06..d197f3dee06c9d62c79691faa102e8761f1de764 100644 (file)
@@ -61,7 +61,7 @@ void CLG_(copy_current_bbcc_hash)(bbcc_hash* dst)
   dst->table   = current_bbccs.table;
 }
 
-bbcc_hash* CLG_(get_current_bbcc_hash)()
+bbcc_hash* CLG_(get_current_bbcc_hash)(void)
 {
   return &current_bbccs;
 }
index 96dfc995a5e667c16494cd4b7aeb72922361054e..fc1d6eeab130f94c382062c7071e15311cb953f9 100644 (file)
@@ -309,7 +309,7 @@ void CLG_(push_call_stack)(BBCC* from, UInt jmp, BBCC* to, Addr sp, Bool skip)
  *
  * If the JCC becomes inactive, call entries are freed if possible
  */
-void CLG_(pop_call_stack)()
+void CLG_(pop_call_stack)(void)
 {
     jCC* jcc;
     Int depth = 0;
index 459c6e6ab181ca93c9dca4476a62bf1d02d7847f..81261bdf1c7e54f0202160008cdf463278b1632b 100644 (file)
@@ -67,7 +67,7 @@ void CLG_(set_current_fn_stack)(fn_stack* s)
 
 static cxt_hash cxts;
 
-void CLG_(init_cxt_table)()
+void CLG_(init_cxt_table)(void)
 {
    Int i;
    
index 368a740b46c1c98476124bb51b2047fbe5c57a0d..7f9f59f92ab372909dbaa09147c4203060580c5e 100644 (file)
@@ -1581,7 +1581,7 @@ void init_cmdbuf(void)
  * This function has to be called every time a profile dump is generated
  * to be able to react on PID changes.
  */
-void CLG_(init_dumps)()
+void CLG_(init_dumps)(void)
 {
    SysRes res;
 
index 45d26ed43f9012e14caf0b816ec4cae211243300..27ad4988a0af5da38b13ed8d7f0d1bd3c839af12 100644 (file)
@@ -300,7 +300,7 @@ static Bool search_runtime_resolve(obj_node* obj)
 /* Object hash table, fixed */
 static obj_node* obj_table[N_OBJ_ENTRIES];
 
-void CLG_(init_obj_table)()
+void CLG_(init_obj_table)(void)
 {
     Int i;
     for (i = 0; i < N_OBJ_ENTRIES; i++)
@@ -741,7 +741,7 @@ void CLG_(copy_current_fn_array)(fn_array* dst)
   dst->array = current_fn_active.array;
 }
 
-fn_array* CLG_(get_current_fn_array)()
+fn_array* CLG_(get_current_fn_array)(void)
 {
   return &current_fn_active;
 }
index 104c63492e36021916238682bcd6870bdb9eceaa..90e6134319a7a0813161f49648fb53352ea7e559 100644 (file)
@@ -1593,7 +1593,7 @@ void cachesim_printstat(Int l1, Int l2, Int l3)
 
 struct event_sets CLG_(sets);
 
-void CLG_(init_eventsets)()
+void CLG_(init_eventsets)(void)
 {
     // Event groups from which the event sets are composed
     // the "Use" group only is used with "cacheuse" simulation
index 20b23c189965725a7893ce13452dd4d22b023c58..624588a2694927409feeba832335043d181b31b9 100644 (file)
@@ -61,17 +61,17 @@ ThreadId CLG_(current_tid);
 
 static thread_info** thread;
 
-thread_info** CLG_(get_threads)()
+thread_info** CLG_(get_threads)(void)
 {
   return thread;
 }
 
-thread_info* CLG_(get_current_thread)()
+thread_info* CLG_(get_current_thread)(void)
 {
   return thread[CLG_(current_tid)];
 }
 
-void CLG_(init_threads)()
+void CLG_(init_threads)(void)
 {
     UInt i;
 
@@ -224,7 +224,7 @@ void CLG_(pre_signal)(ThreadId tid, Int sigNum, Bool alt_stack)
  *
  * Called from CLG_(pop_call_stack)
  */
-void CLG_(run_post_signal_on_call_stack_bottom)()
+void CLG_(run_post_signal_on_call_stack_bottom)(void)
 {
     exec_state* es = top_exec_state();
     CLG_ASSERT(es != 0);
index 7c5467d379ed987689c7ed8d9a5c0e0aed56e779..414c185ccdb6e372b1801783eebc42f88b29e05e 100644 (file)
@@ -1554,7 +1554,6 @@ static ULong DEBUG_SnarfLinetab(
     */
    pnt.c = linetab;
    nfile = *pnt.s++;
-   nseg  = *pnt.s++;
 
    filetab = pnt.ui;
 
index 490276b6c456b30d75c5e491bd9a4c10701b8418..f9f32f4aa5b7f3d17a9a914975b4204c08b0b322 100644 (file)
@@ -190,7 +190,7 @@ Int valgrind_stopped_by_syscall (void)
    return sysno_to_report;
 }
 
-Bool valgrind_stopped_before_syscall()
+Bool valgrind_stopped_before_syscall(void)
 {
    vg_assert (sysno_to_report >= 0);
    return before_syscall;
index 479c7f20e381d3e2d017b85789a28da06ea4e5db..3bd7fa56bd10e372a7c1f8e0b4b7e90cea0bb5d4 100644 (file)
@@ -64,7 +64,7 @@ void DRD_(bm_module_cleanup)(void)
    s_bm2_set_template = NULL;
 }
 
-struct bitmap* DRD_(bm_new)()
+struct bitmap* DRD_(bm_new)(void)
 {
    struct bitmap* bm;
 
index fba1dac71326e98a4e86e685be859c50a3b41c5f..80d326a0e2a91354aaf61fcb3c70716a1f3f5c5c 100644 (file)
@@ -66,7 +66,7 @@ static Bool s_first_race_only      = False;
 
 /* Function definitions. */
 
-Bool DRD_(get_check_stack_accesses)()
+Bool DRD_(get_check_stack_accesses)(void)
 {
    return s_check_stack_accesses;
 }
@@ -77,7 +77,7 @@ void DRD_(set_check_stack_accesses)(const Bool c)
    s_check_stack_accesses = c;
 }
 
-Bool DRD_(get_first_race_only)()
+Bool DRD_(get_first_race_only)(void)
 {
    return s_first_race_only;
 }
index 32064c3b152644cdfe7db7f5e15d30cbd3a2deb0..891967b0394aafd398789e15f33f8c3d2e00093b 100644 (file)
@@ -1681,7 +1681,7 @@ ULong DRD_(thread_get_discard_ordered_segments_count)(void)
 }
 
 /** Return how many times the conflict set has been updated entirely. */
-ULong DRD_(thread_get_compute_conflict_set_count)()
+ULong DRD_(thread_get_compute_conflict_set_count)(void)
 {
    return s_compute_conflict_set_count;
 }
index ee9fa52beabe85712c25d79da5cbeaa58e3f7b56..5705391f27187360aefd58389cf1d17e9e1f06a1 100644 (file)
@@ -67,10 +67,10 @@ void DRD_(vc_cleanup)(VectorClock* const vc)
    DRD_(vc_reserve)(vc, 0);
 }
 
-/** Copy constructor -- initializes *new. */
-void DRD_(vc_copy)(VectorClock* const new, const VectorClock* const rhs)
+/** Copy constructor -- initializes *obj. */
+void DRD_(vc_copy)(VectorClock* const obj, const VectorClock* const rhs)
 {
-   DRD_(vc_init)(new, rhs->vc, rhs->size);
+   DRD_(vc_init)(obj, rhs->vc, rhs->size);
 }
 
 /** Assignment operator -- *lhs is already a valid vector clock. */
index 47dd51baf62b15791f8fc2862fa4e61e616e1c93..0161be0f239502b6147f20ac8e7fe384904d0359 100644 (file)
@@ -72,7 +72,7 @@ void DRD_(vc_init)(VectorClock* const vc,
                    const VCElem* const vcelem,
                    const unsigned size);
 void DRD_(vc_cleanup)(VectorClock* const vc);
-void DRD_(vc_copy)(VectorClock* const new, const VectorClock* const rhs);
+void DRD_(vc_copy)(VectorClock* const obj, const VectorClock* const rhs);
 void DRD_(vc_assign)(VectorClock* const lhs, const VectorClock* const rhs);
 void DRD_(vc_increment)(VectorClock* const vc, DrdThreadId const tid);
 static __inline__