Fix some -Wincompatible-pointer-types-discards-qualifiers warnings (#10951)

This commit is contained in:
Fangrui Song 2018-08-07 02:50:06 -07:00 committed by Riccardo Schirone
parent baa66bc108
commit 08e6ed3b78
3 changed files with 3 additions and 3 deletions

View File

@ -147,7 +147,7 @@ static bool isBinopHelp(const char *op) {
static bool extract_binobj(const RBinFile *bf, RBinXtrData *data, int idx) {
ut64 bin_size = data ? data->size : 0;
ut8 *bytes;
char *xtr_type = "";
const char *xtr_type = "";
char *arch = "unknown";
int bits = 0;
char *libname = NULL;

View File

@ -464,7 +464,7 @@ static void selection_widget_draw() {
for (y = 0; y < R_MIN (sel_widget->h, R_SELWIDGET_MAXH); y++) {
r_cons_gotoxy (pos_x + 1, pos_y - y - 1);
int scroll = R_MAX (0, sel_widget->selection - sel_widget->scroll);
char *option = y < sel_widget->options_len ? sel_widget->options[y + scroll] : "";
const char *option = y < sel_widget->options_len ? sel_widget->options[y + scroll] : "";
r_cons_printf ("%s", sel_widget->selection == y + scroll ? selected_color : background_color);
r_cons_printf ("%-*.*s", sel_widget->w, sel_widget->w, option);
if (scrollbar && R_BETWEEN (scrollbar_y, y, scrollbar_y + scrollbar_l)) {

View File

@ -807,7 +807,7 @@ R_API const char* r_cons_get_rune(const ut8 ch);
#define R_SELWIDGET_MAXW 30
typedef struct r_selection_widget_t {
char **options;
const char **options;
int options_len;
int selection;
int w, h;