diff --git a/include/asm/rpn.h b/include/asm/rpn.h index b9ab6df6..ae1e7450 100644 --- a/include/asm/rpn.h +++ b/include/asm/rpn.h @@ -17,14 +17,14 @@ #define MAXRPNLEN 1048576 struct Expression { - int32_t val; // If the expression's value is known, it's here - char *reason; // Why the expression is not known, if it isn't - bool isKnown; // Whether the expression's value is known - bool isSymbol; // Whether the expression represents a symbol - uint8_t *rpn; // Array of bytes serializing the RPN expression - uint32_t rpnCapacity; // Size of the `tRPN` buffer - uint32_t rpnLength; // Used size of the `tRPN` buffer - uint32_t rpnPatchSize; // Size the expression will take in the obj file + int32_t val; // If the expression's value is known, it's here + char *reason; // Why the expression is not known, if it isn't + bool isKnown; // Whether the expression's value is known + bool isSymbol; // Whether the expression represents a symbol + uint8_t *rpn; // Array of bytes serializing the RPN expression + uint32_t rpnCapacity; // Size of the `rpn` buffer + uint32_t rpnLength; // Used size of the `rpn` buffer + uint32_t rpnPatchSize; // Size the expression will take in the obj file }; /* diff --git a/src/asm/main.c b/src/asm/main.c index 1b5c7c14..57339b2f 100644 --- a/src/asm/main.c +++ b/src/asm/main.c @@ -292,7 +292,7 @@ int main(int argc, char *argv[]) *targetFileName = '\0'; } else { targetFileName = realloc(targetFileName, - targetFileNameLen + 1); + targetFileNameLen + 1); } if (targetFileName == NULL) err(1, "Cannot append new file to target file list"); diff --git a/src/asm/rpn.c b/src/asm/rpn.c index b6b593c7..df493de8 100644 --- a/src/asm/rpn.c +++ b/src/asm/rpn.c @@ -189,8 +189,7 @@ void rpn_BankSection(struct Expression *expr, char const *sectionName) if (section && section->bank != (uint32_t)-1) { expr->val = section->bank; } else { - makeUnknown(expr, "Section \"%s\"'s bank is not known", - sectionName); + makeUnknown(expr, "Section \"%s\"'s bank is not known", sectionName); size_t nameLen = strlen(sectionName) + 1; /* Room for NUL! */ uint8_t *ptr = reserveSpace(expr, nameLen + 1); @@ -361,16 +360,14 @@ void rpn_BinaryOp(enum RPNCommand op, struct Expression *expr, if (src2->val >= 32) warning(WARNING_SHIFT_AMOUNT, - "Shifting left by large amount %" PRId32 "\n", - src2->val); + "Shifting left by large amount %" PRId32 "\n", src2->val); expr->val = op_shift_left(src1->val, src2->val); break; case RPN_SHR: if (src1->val < 0) - warning(WARNING_SHIFT, "Shifting right negative value %" - PRId32 "\n", - src1->val); + warning(WARNING_SHIFT, + "Shifting right negative value %" PRId32 "\n", src1->val); if (src2->val < 0) warning(WARNING_SHIFT_AMOUNT, @@ -392,8 +389,9 @@ void rpn_BinaryOp(enum RPNCommand op, struct Expression *expr, fatalerror("Division by zero\n"); if (src1->val == INT32_MIN && src2->val == -1) { - warning(WARNING_DIV, "Division of %" PRId32 " by -1 yields %" - PRId32 "\n", INT32_MIN, INT32_MIN); + warning(WARNING_DIV, + "Division of %" PRId32 " by -1 yields %" PRId32 "\n", + INT32_MIN, INT32_MIN); expr->val = INT32_MIN; } else { expr->val = op_divide(src1->val, src2->val);