Tcl Source Code

View Ticket
Login
Ticket UUID: 6b8e39e83f9855c79c3c2777f12fb3bd90424912
Title: On Unix, IsTimeNative() always defined but not always used
Type: Patch Version: current
Submitter: stu Created on: 2025-07-02 06:43:40
Subsystem: 06. Time Measurement Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2025-07-03 11:43:45
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2025-07-03 11:43:45
Description:
... resulting in a compiler warning.
Here is a patch to put an #if around the function.

--- unix/tclUnixTime.c.orig
+++ unix/tclUnixTime.c
@@ -43,11 +43,13 @@ GetTime(
     tclGetTimeProcPtr(timePtr, tclTimeClientData);
 }
 
+#if defined(NO_GETTOD) || defined(TCL_WIDE_CLICKS)
 static inline int
 IsTimeNative(void)
 {
     return tclGetTimeProcPtr == NativeGetTime;
 }
+#endif
 

 /*
  *----------------------------------------------------------------------
User Comments: jan.nijtmans added on 2025-07-03 11:43:45:

Fixed [36318ba1e257d315|here]

Thanks for the report!