Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_entropy.c
r153 r154 771 771 i = 0; 772 772 773 while (source [i].command != NULL) {773 while (source_template[i].command != NULL) { 774 774 775 775 j = 0; -
trunk/src/sh_mem.c
r153 r154 261 261 { 262 262 volatile memlist_t * this = memlist; 263 memlist_t* before = memlist;263 volatile memlist_t * before = memlist; 264 264 unsigned long size = 0; 265 265 … … 315 315 free(a); 316 316 if (this) 317 free( this);317 free((void*)this); 318 318 ++Free_Count; 319 319 --Now_Alloc_Count; -
trunk/src/sh_unix.c
r153 r154 551 551 #endif 552 552 { 553 #if defined(SL_DEBUG) 554 int retval; 555 #endif 556 553 557 #if defined(SA_SIGACTION_WORKS) 554 558 if (signal_info != NULL && signal_info->si_code == SI_USER) … … 586 590 #endif 587 591 safe_logger (mysignal, 0, NULL); 588 chdir ("/"); 592 do { 593 retval = chdir ("/"); 594 } while (retval < 0 && errno == EINTR); 589 595 raise(SIGFPE); 590 596 } 591 597 else if (immediate_exit_fast == 2) 592 598 { 593 chdir ("/"); 599 do { 600 retval = chdir ("/"); 601 } while (retval < 0 && errno == EINTR); 594 602 raise(SIGFPE); 595 603 } … … 624 632 #endif 625 633 626 chdir ("/"); 634 do { 635 retval = chdir ("/"); 636 } while (retval < 0 && errno == EINTR); 637 627 638 raise(SIGFPE); 628 639 #endif -
trunk/src/sh_utmp.c
r153 r154 771 771 #endif 772 772 773 /* These variables are not used anywhere. They only exist 774 * to assign &userold, &user to them, which keeps gcc from 775 * putting them into a register, and avoids the 'clobbered 776 * by longjmp' warning. And no, 'volatile' proved insufficient. 777 */ 778 void * sh_dummy_userold = NULL; 779 void * sh_dummy_user = NULL; 780 781 773 782 static void sh_utmp_addlogin (struct SH_UTMP_S * ut) 774 783 { 775 struct 776 volatilestruct log_user * userold = userlist;784 struct log_user * user = userlist; 785 struct log_user * userold = userlist; 777 786 #ifdef HAVE_UTTYPE 778 787 struct log_user * username = userlist; … … 785 794 786 795 SL_ENTER(_("sh_utmp_addlogin")); 796 797 /* Take the address to keep gcc from putting them into registers. 798 * Avoids the 'clobbered by longjmp' warning. 799 */ 800 sh_dummy_userold = (void*) &userold; 801 sh_dummy_user = (void*) &user; 787 802 788 803 if (ut->ut_line[0] == '\0') … … 804 819 while (user != NULL) 805 820 { 806 if (0 == sl_strncmp( user->ut_tty, ut->ut_line, UT_LINESIZE) )821 if (0 == sl_strncmp((char*)(user->ut_tty), ut->ut_line, UT_LINESIZE) ) 807 822 break; 808 823 userold = user; … … 827 842 user = SH_ALLOC(sizeof(struct log_user)); 828 843 user->next = userlist; 829 userlist = user;844 userlist = (struct log_user *) user; 830 845 } 831 (void) sl_strlcpy( user->ut_tty, ut->ut_line, UT_LINESIZE+1);832 (void) sl_strlcpy( user->name, ut->ut_name, UT_NAMESIZE+1);846 (void) sl_strlcpy((char*)(user->ut_tty), ut->ut_line, UT_LINESIZE+1); 847 (void) sl_strlcpy((char*)(user->name), ut->ut_name, UT_NAMESIZE+1); 833 848 #ifdef HAVE_UTHOST 834 (void) sl_strlcpy( user->ut_host, ut->ut_host, UT_HOSTSIZE+1);849 (void) sl_strlcpy((char*)(user->ut_host), ut->ut_host, UT_HOSTSIZE+1); 835 850 #else 836 851 user->ut_host[0] = '\0'; … … 838 853 #ifdef HAVE_UTADDR 839 854 /*@-type@*//* ut_addr does exist !!! */ 840 (void) sl_strlcpy( user->ut_ship,855 (void) sl_strlcpy((char*)(user->ut_ship), 841 856 my_inet_ntoa(*(struct in_addr*)&(ut->ut_addr)), 16); 842 857 /*@+type@*/ … … 848 863 || 0 == sl_strncmp(ut->ut_line, _("ttyq"), 4) /* in virt. console */ 849 864 ) { 850 status = sh_utmp_login_a( user->name);865 status = sh_utmp_login_a((char*)user->name); 851 866 SH_MUTEX_LOCK(mutex_thread_nolog); 852 867 (void) sh_unix_time (user->time, ttt, TIM_MAX); … … 872 887 SH_MUTEX_UNLOCK(mutex_thread_nolog); 873 888 } else 874 if (0 != sh_utmp_is_virtual(ut->ut_line, user->ut_host))889 if (0 != sh_utmp_is_virtual(ut->ut_line, (char*)user->ut_host)) 875 890 { 876 status = sh_utmp_login_a( user->name);891 status = sh_utmp_login_a((char*)user->name); 877 892 SH_MUTEX_LOCK(mutex_thread_nolog); 878 893 (void) sh_unix_time (user->time, ttt, TIM_MAX); … … 911 926 if (user != NULL) 912 927 { 913 status = sh_utmp_login_r( user->name);928 status = sh_utmp_login_r((char*)user->name); 914 929 SH_MUTEX_LOCK(mutex_thread_nolog); 915 930 (void) sh_unix_time (ut->ut_time, ttt, TIM_MAX); … … 937 952 if (user == userlist) 938 953 userlist = user->next; 939 sh_utmp_logout_morechecks( user);940 SH_FREE( user);954 sh_utmp_logout_morechecks((struct log_user *)user); 955 SH_FREE((struct log_user *)user); 941 956 user = NULL; 942 957 }
Note:
See TracChangeset
for help on using the changeset viewer.