Delphi Error – W1047 Unsafe code ‘%s’

Delphi Compiler Error

W1047 Unsafe code ‘%s’

Reason for the Error & Solution

You have used a data type or operation for which static code analysis cannot prove that it does not overwrite memory. Such code can be considered a security risk.

For example, using GetMem can elicit this warning because a block of memory has no associated type.

See Also