Changeset 7515


Ignore:
Timestamp:
06/28/18 21:36:38 (5 months ago)
Author:
baker
Message:

cleanup warning: variable set but not used [-Wunused-but-set-variable]

Location:
trunk/src/libsrc/unix
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libsrc/unix/socket_ew.c

    r6803 r7515  
    1  
    2 /* 
    3  *   THIS FILE IS UNDER RCS - DO NOT MODIFY UNLESS YOU HAVE 
    4  *   CHECKED IT OUT USING THE COMMAND CHECKOUT. 
    5  * 
    6  *    $Id$ 
    7  * 
    8  *    Revision history: 
    9  *     $Log$ 
    10  *     Revision 1.1  2005/07/15 18:20:21  friberg 
    11  *     Unix version of libsrc for POSIX systems 
    12  * 
    13  *     Revision 1.2  2003/02/04 17:57:38  davidk 
    14  *     Added a new function socketSetError_ew() that sets errno to set 
    15  *     the error for the most recent socket call.. 
    16  * 
    17  *     Revision 1.1  2000/02/14 18:46:17  lucky 
    18  *     Initial revision 
    19  * 
    20  * 
    21  */ 
    22  
    231/*  
    242 *  socket_ew.c for Solaris 
     
    286 */ 
    297 
     8#include <errno.h> 
    309#include <stdio.h> 
    31 #include <errno.h> 
    3210#include <sys/time.h> 
    3311#include <unistd.h> 
    34 #include <socket_ew.h> 
    3512 
     13#include "socket_ew.h" 
    3614 
    3715ulong MS_PER_TICK; 
     
    4119                              set in SocketSysInit(),  
    4220                              checked in socket_ew()  */ 
    43  
    4421 
    4522/********************** SocketSysInit ********************* 
     
    7249   return; 
    7350} 
    74  
    7551 
    7652/************************ sendall() *********************** 
     
    10783} 
    10884 
    109  
    11085/********************** socketGetError_ew ***************** 
    11186     Returns the error code for the most recent socket error. 
     
    12499} 
    125100 
    126  
    127101Time_ew GetTime_ew() 
    128102{ 
    129   int retVal; 
    130103  struct timeval CurrentTime; 
    131104 
    132   retVal=gettimeofday(&CurrentTime,0); 
     105  gettimeofday(&CurrentTime,0); 
    133106  return(CurrentTime.tv_sec); 
    134107} 
     
    139112                                      seconds.  Don't truncate */ 
    140113} 
    141  
    142  
  • trunk/src/libsrc/unix/time_ew.c

    r5830 r7515  
    1  
    21     /******************************************************** 
    32      *              time_ew.c   UNIX version                * 
     
    98 
    109#include "platform.h" 
    11 #ifdef _UNIX 
    12 #include <sys/time.h> 
    13 #endif 
    1410#include <stdio.h> 
    1511#include <stdlib.h> 
    1612#include <string.h> 
    1713#include <time.h> 
    18 #include <time_ew.h> 
     14#include <sys/time.h> 
     15 
     16#include "time_ew.h" 
    1917 
    2018/******************************************************** 
     
    157155       *tnow = (double) t.tv_sec + (double)t.tv_nsec*0.000000001; 
    158156    } 
    159  
    160157    else {    
    161158       *tnow = 0; 
    162159    } 
    163160#else 
    164                 struct timezone tz; 
    165             struct timeval tv; 
    166                 tz.tz_minuteswest=0; 
    167                 tz.tz_dsttime=0; 
    168                 gettimeofday(&tv, NULL); 
    169            *tnow= tv.tv_sec+tv.tv_usec/1000000.; 
     161    struct timeval tv; 
     162 
     163    gettimeofday(&tv, NULL); 
     164    *tnow= tv.tv_sec+tv.tv_usec/1000000.; 
    170165#endif 
    171166    return( *tnow ); 
    172167} 
    173  
    174168 
    175169/********************************************************** 
     
    212206} 
    213207 
    214  
    215  
    216208/********************************************************** 
    217209 * Converts time (double, seconds since 1970:01:01) to    * 
Note: See TracChangeset for help on using the changeset viewer.