remove unused and unecessary variables
This commit is contained in:
parent
c6f27e1e69
commit
89f718ce34
|
@ -372,7 +372,7 @@ int char_class(char c)
|
||||||
Return values: Token
|
Return values: Token
|
||||||
*/
|
*/
|
||||||
Token aa_func02(char lexeme[]) {
|
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;
|
Token t;
|
||||||
char v_type;
|
char v_type;
|
||||||
char* temp_str;
|
char* temp_str;
|
||||||
|
@ -431,7 +431,7 @@ Token aa_func02(char lexeme[]) {
|
||||||
*/
|
*/
|
||||||
Token aa_func03(char lexeme[]) {
|
Token aa_func03(char lexeme[]) {
|
||||||
Token t;
|
Token t;
|
||||||
unsigned int i, offset;
|
unsigned offset;
|
||||||
char* temp_str;
|
char* temp_str;
|
||||||
if ((temp_str = (char*)calloc(VID_LEN + 2, sizeof(char))) == NULL) {
|
if ((temp_str = (char*)calloc(VID_LEN + 2, sizeof(char))) == NULL) {
|
||||||
return aa_table[ES]("RUN TIME ERROR: ");
|
return aa_table[ES]("RUN TIME ERROR: ");
|
||||||
|
|
13
stable.c
13
stable.c
|
@ -60,7 +60,6 @@ STD st_create(int st_size){
|
||||||
*/
|
*/
|
||||||
int st_install(STD s_table, char *lexeme, char type, int line){
|
int st_install(STD s_table, char *lexeme, char type, int line){
|
||||||
unsigned int offset, i;
|
unsigned int offset, i;
|
||||||
char f_realloc; /* Reallocation flag */
|
|
||||||
|
|
||||||
/* Cannot add new entry, table full */
|
/* Cannot add new entry, table full */
|
||||||
if (s_table.st_offset >= s_table.st_size)
|
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){
|
for (i = 0; i < strlen(lexeme); ++i){
|
||||||
if (!b_addc(s_table.plsBD, lexeme[i]))
|
if (!b_addc(s_table.plsBD, lexeme[i]))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (b_rflag(s_table.plsBD) == SET_R_FLAG)
|
|
||||||
f_realloc = SET_R_FLAG;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!b_addc(s_table.plsBD, '\0'))
|
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
|
/* 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;
|
int i;
|
||||||
|
|
||||||
/* Windows does not like fopen, and fopen_s is Windows-only. This will ensure the
|
/* 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
|
#ifdef _WIN32
|
||||||
if(fopen_s(&out, ST_FILE_NAME, "w+") != 0)
|
if(fopen_s(&out, ST_FILE_NAME, "w+") != 0)
|
||||||
|
@ -357,5 +355,8 @@ static void st_incoffset(void){
|
||||||
* Algorithm:
|
* Algorithm:
|
||||||
*/
|
*/
|
||||||
int st_sort(STD s_table, char s_order){
|
int st_sort(STD s_table, char s_order){
|
||||||
|
/* Compiler warning about unused parameter,
|
||||||
|
* this is fine for this "future" implementation
|
||||||
|
*/
|
||||||
return 0; /* SYKE! */
|
return 0; /* SYKE! */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue