aboutsummaryrefslogtreecommitdiff
path: root/src/third_party
diff options
context:
space:
mode:
authorSiyangXie@gmail.com <SiyangXie@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-10-15 19:43:07 +0000
committerSiyangXie@gmail.com <SiyangXie@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-10-15 19:43:07 +0000
commit361f24eac7fb452a795709479fc48fd59b04bc1f (patch)
tree3b7c61796115cb753f4b47b56bb5eccda0122a91 /src/third_party
parentFix for bug: debug checks for vector::operator[] fail in breakpad. (diff)
downloadbreakpad-361f24eac7fb452a795709479fc48fd59b04bc1f.tar.xz
Fix some compiler warnings: char*->const char*, default in swtch.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@713 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/third_party')
-rw-r--r--src/third_party/libdisasm/x86_format.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/third_party/libdisasm/x86_format.c b/src/third_party/libdisasm/x86_format.c
index b5b47e30..aed8cce4 100644
--- a/src/third_party/libdisasm/x86_format.c
+++ b/src/third_party/libdisasm/x86_format.c
@@ -46,7 +46,7 @@
} \
} while( 0 )
-static char *prefix_strings[] = {
+static const char *prefix_strings[] = {
"", /* no prefix */
"repz ", /* the trailing spaces make it easy to prepend to mnemonic */
"repnz ",
@@ -115,7 +115,7 @@ static void get_operand_data_str( x86_op_t *op, char *str, int len ){
static void get_operand_regtype_str( int regtype, char *str, int len )
{
static struct {
- char *name;
+ const char *name;
int value;
} operand_regtypes[] = {
{"reg_gen" , 0x00001},
@@ -285,7 +285,7 @@ static int format_expr( x86_ea_t *ea, char *buf, int len,
static int format_seg( x86_op_t *op, char *buf, int len,
enum x86_asm_format format ) {
int len_orig = len;
- char *reg = "";
+ const char *reg = "";
if (! op || ! buf || ! len || ! op->flags) {
return(0);
@@ -293,7 +293,7 @@ static int format_seg( x86_op_t *op, char *buf, int len,
if ( op->type != op_offset && op->type != op_expression ){
return(0);
}
- if (! (int) op->flags & 0xF00 ) {
+ if (! ((int) op->flags & 0xF00) ) {
return(0);
}
@@ -329,9 +329,9 @@ static int format_seg( x86_op_t *op, char *buf, int len,
return( len_orig - len ); /* return length of appended string */
}
-static char *get_operand_datatype_str( x86_op_t *op ){
+static const char *get_operand_datatype_str( x86_op_t *op ){
- static char *types[] = {
+ static const char *types[] = {
"sbyte", /* 0 */
"sword",
"sqword",
@@ -406,7 +406,7 @@ static int format_insn_eflags_str( enum x86_flag_status flags, char *buf,
int len) {
static struct {
- char *name;
+ const char *name;
int value;
} insn_flags[] = {
{ "carry_set ", 0x0001 },
@@ -441,9 +441,9 @@ static int format_insn_eflags_str( enum x86_flag_status flags, char *buf,
return( len_orig - len );
}
-static char *get_insn_group_str( enum x86_insn_group gp ) {
+static const char *get_insn_group_str( enum x86_insn_group gp ) {
- static char *types[] = {
+ static const char *types[] = {
"", // 0
"controlflow",// 1
"arithmetic", // 2
@@ -468,10 +468,10 @@ static char *get_insn_group_str( enum x86_insn_group gp ) {
return types[gp];
}
-static char *get_insn_type_str( enum x86_insn_type type ) {
+static const char *get_insn_type_str( enum x86_insn_type type ) {
static struct {
- char *name;
+ const char *name;
int value;
} types[] = {
/* insn_controlflow */
@@ -593,8 +593,8 @@ static char *get_insn_type_str( enum x86_insn_type type ) {
return "";
}
-static char *get_insn_cpu_str( enum x86_insn_cpu cpu ) {
- static char *intel[] = {
+static const char *get_insn_cpu_str( enum x86_insn_cpu cpu ) {
+ static const char *intel[] = {
"", // 0
"8086", // 1
"80286", // 2
@@ -621,8 +621,8 @@ static char *get_insn_cpu_str( enum x86_insn_cpu cpu ) {
return "";
}
-static char *get_insn_isa_str( enum x86_insn_isa isa ) {
- static char *subset[] = {
+static const char *get_insn_isa_str( enum x86_insn_isa isa ) {
+ static const char *subset[] = {
NULL, // 0
"General Purpose", // 1
"Floating Point", // 2
@@ -885,7 +885,7 @@ static int format_operand_raw( x86_op_t *op, x86_insn_t *insn, char *buf,
int len){
char str[MAX_OP_RAW_STRING];
- char *datatype = get_operand_datatype_str(op);
+ const char *datatype = get_operand_datatype_str(op);
switch (op->type) {
case op_register:
@@ -1016,7 +1016,7 @@ int x86_format_operand( x86_op_t *op, char *buf, int len,
static int format_att_mnemonic( x86_insn_t *insn, char *buf, int len) {
int size = 0;
- char *suffix;
+ const char *suffix;
if (! insn || ! buf || ! len )
return(0);