diff options
| author | David M. Syzdek <syzdek@bindlebinaries.com> | 2013-12-05 14:51:47 -0900 |
|---|---|---|
| committer | David M. Syzdek <syzdek@bindlebinaries.com> | 2013-12-05 14:51:47 -0900 |
| commit | 710138e91dec4eb1c68e1d900651616013a2296a (patch) | |
| tree | 41daaf97e8379b8398af3394c98e2e0e4005f96a | |
| parent | 9aabdbe4e75cdf623de94870326a69084b44d86e (diff) | |
| download | dmstools-710138e91dec4eb1c68e1d900651616013a2296a.tar.gz dmstools-710138e91dec4eb1c68e1d900651616013a2296a.tar.bz2 dmstools-710138e91dec4eb1c68e1d900651616013a2296a.tar.xz dmstools-710138e91dec4eb1c68e1d900651616013a2296a.zip | |
Fixing type casting in codetagger.
| -rw-r--r-- | src/codetagger.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/codetagger.c b/src/codetagger.c index 685283f..669bd07 100644 --- a/src/codetagger.c +++ b/src/codetagger.c | |||
| @@ -158,8 +158,8 @@ struct codetagger_config | |||
| 158 | { | 158 | { |
| 159 | unsigned opts; | 159 | unsigned opts; |
| 160 | unsigned tagCount; | 160 | unsigned tagCount; |
| 161 | unsigned buff_size; ///< size of each file buffer | 161 | size_t buff_size; ///< size of each file buffer |
| 162 | int len_orig; ///< length of the content of the original file | 162 | ssize_t len_orig; ///< length of the content of the original file |
| 163 | int pos_orig; ///< current location in buffer for original file | 163 | int pos_orig; ///< current location in buffer for original file |
| 164 | int pos_modd; ///< current location in buffer for updated file | 164 | int pos_modd; ///< current location in buffer for updated file |
| 165 | char * buff_orig; ///< buffer for original file | 165 | char * buff_orig; ///< buffer for original file |
| @@ -392,8 +392,8 @@ void codetagger_error(CodeTagger * cnf, const char * fmt, ...) | |||
| 392 | int codetagger_escape_string(CodeTagger * cnf, char * buff, const char * str, | 392 | int codetagger_escape_string(CodeTagger * cnf, char * buff, const char * str, |
| 393 | size_t len) | 393 | size_t len) |
| 394 | { | 394 | { |
| 395 | unsigned strpos; | 395 | size_t strpos; |
| 396 | unsigned buffpos; | 396 | size_t buffpos; |
| 397 | 397 | ||
| 398 | codetagger_debug(cnf); | 398 | codetagger_debug(cnf); |
| 399 | 399 | ||
| @@ -484,7 +484,7 @@ char ** codetagger_get_file_contents(CodeTagger * cnf, const char * file) | |||
| 484 | { | 484 | { |
| 485 | int i; | 485 | int i; |
| 486 | int fd; | 486 | int fd; |
| 487 | int len; | 487 | ssize_t len; |
| 488 | int count; | 488 | int count; |
| 489 | char * buff; | 489 | char * buff; |
| 490 | char ** lines; | 490 | char ** lines; |
| @@ -809,7 +809,7 @@ int codetagger_scan_file(CodeTagger * cnf, const char * file, | |||
| 809 | { | 809 | { |
| 810 | int err; | 810 | int err; |
| 811 | void * ptr; | 811 | void * ptr; |
| 812 | unsigned u; | 812 | ssize_t u; |
| 813 | struct stat sb; | 813 | struct stat sb; |
| 814 | 814 | ||
| 815 | if (cnf->opts & CODETAGGER_OPT_LINKS) | 815 | if (cnf->opts & CODETAGGER_OPT_LINKS) |
| @@ -873,18 +873,18 @@ int codetagger_scan_file(CodeTagger * cnf, const char * file, | |||
| 873 | int codetagger_update_file(CodeTagger * cnf, const char * filename, | 873 | int codetagger_update_file(CodeTagger * cnf, const char * filename, |
| 874 | struct stat * sbp) | 874 | struct stat * sbp) |
| 875 | { | 875 | { |
| 876 | int fd; | 876 | int fd; |
| 877 | int err; | 877 | int err; |
| 878 | int pos; | 878 | long long pos; |
| 879 | int changed; | 879 | int changed; |
| 880 | int len_margin; | 880 | long long len_margin; |
| 881 | int len_stripped; | 881 | long long len_stripped; |
| 882 | int len_tagname; | 882 | long long len_tagname; |
| 883 | char margin[CODETAGGER_STR_LEN]; | 883 | char margin[CODETAGGER_STR_LEN]; |
| 884 | char stripped[CODETAGGER_STR_LEN]; | 884 | char stripped[CODETAGGER_STR_LEN]; |
| 885 | char tagname[CODETAGGER_STR_LEN]; | 885 | char tagname[CODETAGGER_STR_LEN]; |
| 886 | char * bol; | 886 | char * bol; |
| 887 | regmatch_t match[5]; | 887 | regmatch_t match[5]; |
| 888 | CodeTaggerData * tag; | 888 | CodeTaggerData * tag; |
| 889 | struct stat sb; | 889 | struct stat sb; |
| 890 | 890 | ||
