summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2018-08-29 18:57:55 +0200
committerpgen <p.gen.progs@gmail.com>2018-08-29 21:02:53 +0200
commit895919947ca8737835b278d73fea5395731ae7e9 (patch)
tree71624e1d6910c81c72240853e71186bb9330e0c6
parent3f311d4cce0c0d84bbed9d168ce2a6ca52a63cdd (diff)
Fix some compiler warnings
-rw-r--r--smenu.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/smenu.c b/smenu.c
index da86669..0bd84ed 100644
--- a/smenu.c
+++ b/smenu.c
@@ -2359,10 +2359,10 @@ insert_sorted_ptr(tst_node_t *** array, unsigned long long * size,
while (left < right)
{
middle = (left + right) / 2;
- if ((unsigned long long)((*array)[middle]) == (unsigned long long)ptr)
+ if ((intptr_t)((*array)[middle]) == (intptr_t)ptr)
return; /* Value already in array */
- if ((unsigned long long)ptr < (unsigned long long)((*array)[middle]))
+ if ((intptr_t)ptr < (intptr_t)((*array)[middle]))
right = middle;
else
left = middle + 1;
@@ -2532,7 +2532,7 @@ update_bitmaps(search_mode_t mode, search_data_t * data,
}
if (mode == FUZZY)
{
- long mb_index;
+ size_t mb_index;
free(str);
@@ -6392,7 +6392,6 @@ select_ending_matches(win_t * win, term_t * term, search_data_t * search_data,
index = matching_words_a[i];
long len = word_a[index].len;
char * str = word_a[index].str;
- char * mb;
/* count the trailing blanks non counted in the bitmap */
/* """"""""""""""""""""""""""""""""""""""""""""""""""" */
@@ -6460,7 +6459,7 @@ select_ending_matches(win_t * win, term_t * term, search_data_t * search_data,
/* """"""""""""""""""""""""""""""""""""""" */
update_bitmaps(search_mode, search_data, END_AFFINITY);
- current = matching_words_a[0];
+ current = matching_words_a[0];
if (current < win->start || current > win->end)
*last_line = build_metadata(term, count, win);
@@ -6543,7 +6542,7 @@ select_starting_matches(win_t * win, term_t * term, search_data_t * search_data,
/* """"""""""""""""""""""""""""""""""""""" */
update_bitmaps(search_mode, search_data, START_AFFINITY);
- current = matching_words_a[0];
+ current = matching_words_a[0];
if (current < win->start || current > win->end)
*last_line = build_metadata(term, count, win);
@@ -7775,7 +7774,7 @@ main(int argc, char * argv[])
{
long pos;
- if (sscanf(argv[optind] + 2, "%ld%n", &daccess_index, &pos)
+ if (sscanf(argv[optind] + 2, "%ld%ln", &daccess_index, &pos)
== 1)
{
if (daccess_index < 0 || *(argv[optind] + 2 + pos) != '\0')
@@ -12159,7 +12158,7 @@ main(int argc, char * argv[])
/* """"""""""""""""""""""""""""""""""""""" */
update_bitmaps(search_mode, &search_data, NO_AFFINITY);
- current = matching_words_a[0];
+ current = matching_words_a[0];
if (current < win.start || current > win.end)
last_line = build_metadata(&term, count, &win);
@@ -12327,7 +12326,7 @@ main(int argc, char * argv[])
/* """"""""""""""""""""""""""""""""""""""" */
update_bitmaps(search_mode, &search_data, NO_AFFINITY);
- current = matching_words_a[0];
+ current = matching_words_a[0];
if (current < win.start || current > win.end)
last_line = build_metadata(&term, count, &win);
@@ -12406,7 +12405,7 @@ main(int argc, char * argv[])
else
update_bitmaps(search_mode, &search_data, NO_AFFINITY);
- current = matching_words_a[0];
+ current = matching_words_a[0];
if (current < win.start || current > win.end)
last_line = build_metadata(&term, count, &win);