summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2012-12-29 13:32:49 +0100
committerLuca Falavigna <dktrkranz@debian.org>2012-12-29 13:32:49 +0100
commite35481d208a0225623450d37fa45ff95cb753a18 (patch)
tree94da5deb64c6d6e20c859726a4f66a448a4c6882
parentad164d79d99fc0b9da0fe8a9c7148a08b7121be4 (diff)
downloadninka-e35481d208a0225623450d37fa45ff95cb753a18.tar.gz
Silence some compiler warnings
-rw-r--r--comments/dformat.cpp14
-rw-r--r--comments/func.cpp28
2 files changed, 21 insertions, 21 deletions
diff --git a/comments/dformat.cpp b/comments/dformat.cpp
index 3dbef34..7108dbd 100644
--- a/comments/dformat.cpp
+++ b/comments/dformat.cpp
@@ -31,7 +31,7 @@ dformat::dformat(int a, char** av)
io.regionsCount = 0;
io.doneOutput = 0;
- if(!load_arguments("-x")) cerr << "Programmer goofed, you should not see this. Error clearing out arguments." << endl;
+ if(!load_arguments((char *)"-x")) cerr << "Programmer goofed, you should not see this. Error clearing out arguments." << endl;
test_args=true; // Lets make sure the arg syntax is good first
while(next()) ;
@@ -43,7 +43,7 @@ dformat::dformat(int a, char** av)
io.done(test_args);
test_args=false;
// Clear out the settings
- if(!load_arguments("-x")) cerr << "Programmer goofed, you should not see this. Error clearing out arguments." << endl;
+ if(!load_arguments((char *)"-x")) cerr << "Programmer goofed, you should not see this. Error clearing out arguments." << endl;
};
dformat::~dformat() {};
@@ -182,7 +182,7 @@ bool dformat::load_arguments(char* str)
if(strlen(str)==0)
return false;
- for(int x=1; x<(signed)strlen(str); x++)
+ for(unsigned int x=1; x<strlen(str); x++)
{
switch(str[x])
{
@@ -522,11 +522,11 @@ bool dformat::format()
if(flag_history[0].in_hex) // get out of hex if we are in one
flag_history[0].in_hex=false;
}
- else if((!is_whitespace(io.last_written[(LAST_WRITTEN_LENGTH-1)]) && (is_letter(io.last_written[(LAST_WRITTEN_LENGTH-1)])
- || io.last_written[(LAST_WRITTEN_LENGTH-1)]=='_') || is_number(io.last_written[(LAST_WRITTEN_LENGTH-1)]))
+ else if(((!is_whitespace(io.last_written[(LAST_WRITTEN_LENGTH-1)]) && (is_letter(io.last_written[(LAST_WRITTEN_LENGTH-1)])
+ || io.last_written[(LAST_WRITTEN_LENGTH-1)]=='_')) || is_number(io.last_written[(LAST_WRITTEN_LENGTH-1)]))
&&
- (!is_whitespace(io.buf[1]) && (is_letter(io.buf[1])
- || io.buf[1]=='_') || is_number(io.buf[1])) )
+ (!is_whitespace(io.buf[1]) && ((is_letter(io.buf[1])
+ || io.buf[1]=='_') || is_number(io.buf[1]))) )
io.out();
else if(!strncmp((io.buf+1),"...",3) || !strncmp((io.last_written+(LAST_WRITTEN_LENGTH-3)),"...",3))
io.out(); // need space before (and after) these if already there
diff --git a/comments/func.cpp b/comments/func.cpp
index ab05c78..51c6ae9 100644
--- a/comments/func.cpp
+++ b/comments/func.cpp
@@ -17,20 +17,20 @@
#include "main.h"
#define NUM_PREPROCESSOR_STR 14
-char *preprocessors[]={"define",
- "include",
- "undef",
- "pragma",
- "if",
- "error",
- "warning",
- "else",
- "elseif",
- "elif",
- "endif",
- "ifdef",
- "ifndef",
- "ifdefine"};
+char *preprocessors[]={(char *)"define",
+ (char *)"include",
+ (char *)"undef",
+ (char *)"pragma",
+ (char *)"if",
+ (char *)"error",
+ (char *)"warning",
+ (char *)"else",
+ (char *)"elseif",
+ (char *)"elif",
+ (char *)"endif",
+ (char *)"ifdef",
+ (char *)"ifndef",
+ (char *)"ifdefine"};
bool is_letter(char ch)
{