Fix compilation for Darwin i386, and hide "unused variable" notes #16

Closed
michaliskambi wants to merge 2 commits from darwin-32-fix into master
michaliskambi commented 2017-09-13 09:35:04 +00:00 (Migrated from github.com)

Testing compilation of Kraft on Darwin (Mac OS X) i386, I got multiple errors like

kraft.pas(4243,30) Error: Generating PIC, but reference is not PIC-safe

That's probably because on Darwin, compiling with PIC is the default (see the bottom of http://wiki.freepascal.org/PIC_information ). This pull request simply avoids defining CPU386ASMForSinglePrecision in this case.

Also, I added {$notes off}. Compiling Kraft.pas with notes enabled currently produces 37 notes about unused variables :)

kraft.pas(14151,27) Note: Local variable "NewStart" is assigned but never used
kraft.pas(14153,6) Note: Local variable "ti" is assigned but never used

It's not a big deal of course, but it makes the compiler output less useful when compiling a larger application with Kraft.pas inside.

Testing compilation of Kraft on Darwin (Mac OS X) i386, I got multiple errors like ``` kraft.pas(4243,30) Error: Generating PIC, but reference is not PIC-safe ``` That's probably because on Darwin, compiling with PIC is the default (see the bottom of http://wiki.freepascal.org/PIC_information ). This pull request simply avoids defining `CPU386ASMForSinglePrecision` in this case. Also, I added `{$notes off}`. Compiling Kraft.pas with notes enabled currently produces 37 notes about unused variables :) ``` kraft.pas(14151,27) Note: Local variable "NewStart" is assigned but never used kraft.pas(14153,6) Note: Local variable "ti" is assigned but never used ``` It's not a big deal of course, but it makes the compiler output less useful when compiling a larger application with Kraft.pas inside.
BeRo1985 commented 2017-09-16 08:30:07 +00:00 (Migrated from github.com)
- See https://github.com/BeRo1985/kraft/commit/9ca2fd271708b511698fcd38b55b9ecaee4cc673

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BeRo1985/kraft!16
No description provided.