﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6152	Linker warning mktemp is dangerous	Andreas Heuermann	Martin Sjölund	"When compiling omc we get warnings that some functions like `mktemp` and `tmpnam` are dangerous and should be replaced.

{{{
/usr/bin/ld: /home/andreas/workspace/OpenModelica/build/lib/x86_64-linux-gnu/omc/libModelicaExternalC.a(ModelicaInternal.o): in function `ModelicaInternal_temporaryFileName':
/home/andreas/workspace/OpenModelica/OMCompiler/3rdParty/ModelicaExternalC/BuildProjects/autotools/../../C-Sources/ModelicaInternal.c:652: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /home/andreas/workspace/OpenModelica/build/lib/x86_64-linux-gnu/omc/libModelicaMatIO.a(ModelicaMatIO.o): in function `Mat_VarDelete':                          /home/andreas/workspace/OpenModelica/OMCompiler/3rdParty/ModelicaExternalC/BuildProjects/autotools/../../C-Sources/ModelicaMatIO.c:4854: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
}}}

Annoying but not really a problem (besides security concerns of course).

When compiling Modelica models with OMEdit users will get the same errror message in the ""Compilation"" tab.

{{{
/usr/bin/ld: /home/andreas/workspace/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libModelicaMatIO.a(ModelicaMatIO.o): in function `Mat_VarDelete':
/home/andreas/workspace/OpenModelica/OMCompiler/3rdParty/ModelicaExternalC/BuildProjects/autotools/../../C-Sources/ModelicaMatIO.c:4854: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
}}}

This will raise questions for a lot of users if they did something wrong when building a model."	defect	new	normal		Build Environment	v1.17.0-dev		linker, mktemp, tmpnam	
