- Timestamp:
- May 30, 2015, 7:57:16 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cutest_sh_unix.c
r237 r474 42 42 CuAssertPtrNotNull(tc, buf); 43 43 #ifndef USE_SYSTEM_MALLOC 44 #ifndef __clang__ 44 45 CuAssertIntEquals (tc, malloc_count, (i_malloc + 1)); 46 #endif 45 47 #endif 46 48 free(buf); -
trunk/src/sh_err_console.c
r379 r474 328 328 /* --- daemon && initialized --- 329 329 */ 330 if ( (OnlyStderr == S_FALSE))330 if ( OnlyStderr == S_FALSE ) 331 331 { 332 332 fd[0] = open ( sh.srvcons.name, O_WRONLY|O_APPEND|O_NOCTTY|O_NONBLOCK); … … 340 340 } 341 341 342 if (sh.srvcons.alt != NULL && sh.srvcons.alt[0] != '\0')342 if (sh.srvcons.alt[0] != '\0') 343 343 { 344 344 fd[1] = open (sh.srvcons.alt, O_WRONLY|O_APPEND|O_NOCTTY|O_NONBLOCK); -
trunk/src/sh_gpg.c
r454 r474 419 419 /* use homedir of effective user 420 420 */ 421 if (sh.effective.home != NULL) 422 { 423 len = sl_strlen(sh.effective.home) + 6; 424 envp[0] = calloc(1, len); /* free() ok */ 425 if (envp[0] != NULL) 421 len = sl_strlen(sh.effective.home) + 6; 422 envp[0] = calloc(1, len); /* free() ok */ 423 if (envp[0] != NULL) 426 424 sl_snprintf (envp[0], len, _("HOME=%s"), sh.effective.home); 427 envp[1] = NULL; 428 } 429 else 430 { 431 envp[0] = NULL; 432 } 425 envp[1] = NULL; 433 426 434 427 /* Create the pipe -
trunk/src/sh_hash.c
r463 r474 1751 1751 } 1752 1752 1753 if (buf != NULL && buf->fullpath != NULL) {1753 if (buf != NULL) { 1754 1754 1755 1755 old_len = sl_strlen(buf->fullpath); … … 3099 3099 theFile->fullpath, fileHash, p->theFile.checksum)); 3100 3100 3101 if ( (fileHash != NULL) && (p->theFile.checksum != NULL) &&3101 if ( (fileHash != NULL) && 3102 3102 (strncmp (fileHash, p->theFile.checksum, KEY_LEN) != 0) && 3103 3103 (theFile->check_mask & MODI_CHK) != 0) -
trunk/src/sh_inotify.c
r465 r474 22 22 #if defined(HAVE_SYS_INOTIFY_H) 23 23 24 #if defined(GCC_VERSION_MAJOR) 24 #if defined(GCC_VERSION_MAJOR) && !defined(__clang__) 25 25 #if (GCC_VERSION_MAJOR > 4) || ((GCC_VERSION_MAJOR == 4) && (GCC_VERSION_MINOR > 8)) 26 26 #pragma GCC diagnostic ignored "-Wclobbered" -
trunk/src/sh_nmail.c
r465 r474 24 24 #endif 25 25 26 #if defined(GCC_VERSION_MAJOR) 26 #if defined(GCC_VERSION_MAJOR) && !defined(__clang__) 27 27 #if (GCC_VERSION_MAJOR > 4) || ((GCC_VERSION_MAJOR == 4) && (GCC_VERSION_MINOR > 8)) 28 28 #pragma GCC diagnostic ignored "-Wclobbered" -
trunk/src/sh_srp.c
r473 r474 86 86 int siz_str_internal = 0; 87 87 88 inline 88 static 89 89 char * big_string (bignum * a, int base) 90 90 { -
trunk/src/sh_suidchk.c
r458 r474 203 203 ShSuidchkSeverity = SH_ERR_SEVERE; 204 204 if (ShSuidchkExclude != NULL) 205 sh_suid_exclude_free( ShSuidchkExclude);205 sh_suid_exclude_free(); 206 206 207 207 FileLimNow = 0; -
trunk/src/sh_tiger1_64.c
r451 r474 5 5 #include "config_xor.h" 6 6 7 #if defined(__clang__) 8 #undef TIGER_OPT_ASM 9 #endif 10 7 11 #if defined(TIGER_64_BIT) 8 12 9 #if defined(GCC_VERSION_MAJOR) 13 #if defined(GCC_VERSION_MAJOR) && !defined(__clang__) 10 14 #if ((GCC_VERSION_MAJOR == 4) && (GCC_VERSION_MINOR > 6)) 11 15 #pragma GCC optimize ("O1") 12 16 #endif 13 17 #endif 18 14 19 15 20 /* #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) */ -
trunk/src/sh_unix.c
r473 r474 972 972 973 973 SL_ENTER(_("sh_unix_self_check")); 974 if (sh.exec.path == NULL || sh.exec.path[0] == '\0')974 if (sh.exec.path[0] == '\0') 975 975 SL_RETURN((0), _("sh_unix_self_check")); 976 976 -
trunk/src/sh_utmp.c
r383 r474 319 319 SL_ENTER(_("sh_utmp_setutent")); 320 320 321 ASSERT((sh_utmppath != NULL), _("sh_utmppath != NULL"));322 323 if (sh_utmppath == NULL)324 SL_RET0(_("sh_utmp_setutent"));325 326 321 if (sh_utmpfile == NULL) 327 322 { -
trunk/src/trustfile.c
r454 r474 211 211 #define SL_ALWAYS_TRUSTED 0 212 212 #endif 213 staticuid_t test_rootonly[] = { SL_ALWAYS_TRUSTED };213 uid_t test_rootonly[] = { SL_ALWAYS_TRUSTED }; 214 214 215 215 #define tf_uid_neg ((uid_t)-1) -
trunk/src/zAVLTree.c
r465 r474 39 39 return (zAVLKey) arg; 40 40 } 41 41 42 static char * dummy_zfree_string; 43 #ifdef __clang__ 44 static char * dummy_zfree_str; 45 #endif 46 42 47 static void zfree_string (void * inptr) 43 48 { 49 #ifdef __clang__ 50 dummy_zfree_str = (char *) inptr; 51 #else 44 52 char * str = (char *) inptr; 53 #endif 45 54 46 55 /* Take the address to circumvent gcc 4.9 optimizer bug */ 47 56 dummy_zfree_string = (char *) &inptr; 48 57 58 #ifdef __clang__ 59 dummy_zfree_str[0] = '\0'; 60 free (dummy_zfree_str); 61 #else 49 62 str[0] = '\0'; 50 63 free (inptr); 64 #endif 51 65 return; 52 66 } … … 537 551 if (avlnode->right) 538 552 zAVLFreeBranch(avlnode->right, freeitem); 539 if (freeitem) 553 if (freeitem) { 540 554 freeitem(avlnode->item); 555 avlnode->item = NULL; 556 } 541 557 free(avlnode); 542 558 }
Note:
See TracChangeset
for help on using the changeset viewer.