remove unused and unecessary variables

This commit is contained in:
Victor Fernandes 2017-04-04 19:26:00 -04:00
parent c6f27e1e69
commit 89f718ce34
2 changed files with 10 additions and 9 deletions

View File

@ -372,7 +372,7 @@ int char_class(char c)
Return values: Token
*/
Token aa_func02(char lexeme[]) {
unsigned int i, kw_idx, offset; /* Variable to contain keyword table index */
unsigned kw_idx, offset; /* Variable to contain keyword table index */
Token t;
char v_type;
char* temp_str;
@ -431,7 +431,7 @@ Token aa_func02(char lexeme[]) {
*/
Token aa_func03(char lexeme[]) {
Token t;
unsigned int i, offset;
unsigned offset;
char* temp_str;
if ((temp_str = (char*)calloc(VID_LEN + 2, sizeof(char))) == NULL) {
return aa_table[ES]("RUN TIME ERROR: ");

View File

@ -60,7 +60,6 @@ STD st_create(int st_size){
*/
int st_install(STD s_table, char *lexeme, char type, int line){
unsigned int offset, i;
char f_realloc; /* Reallocation flag */
/* Cannot add new entry, table full */
if (s_table.st_offset >= s_table.st_size)
@ -78,9 +77,6 @@ int st_install(STD s_table, char *lexeme, char type, int line){
for (i = 0; i < strlen(lexeme); ++i){
if (!b_addc(s_table.plsBD, lexeme[i]))
return -1;
if (b_rflag(s_table.plsBD) == SET_R_FLAG)
f_realloc = SET_R_FLAG;
}
if (!b_addc(s_table.plsBD, '\0'))
@ -107,7 +103,7 @@ int st_install(STD s_table, char *lexeme, char type, int line){
}
/* TODO: Handle reallocation flag behaviour
if (f_realloc == SET_R_FLAG){
if (b_rflag(s_table.plsBD) == SET_R_FLAG){
}
*/
@ -293,7 +289,9 @@ int st_store(STD s_table){
int i;
/* Windows does not like fopen, and fopen_s is Windows-only. This will ensure the
* use of the proper function call if PLATYPUS is being built on a non-windows system
* use of the proper function call if PLATYPUS is being built on a non-windows system.
* Best approach is to add _CRT_SECURE_NO_WARNINGS to the preprocessor definitions, but
* this works, too.
*/
#ifdef _WIN32
if(fopen_s(&out, ST_FILE_NAME, "w+") != 0)
@ -357,5 +355,8 @@ static void st_incoffset(void){
* Algorithm:
*/
int st_sort(STD s_table, char s_order){
/* Compiler warning about unused parameter,
* this is fine for this "future" implementation
*/
return 0; /* SYKE! */
}