Skip to content

Commit

Permalink
Fix some unused variables
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24497 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Feb 10, 2015
1 parent 1d00cd6 commit 25d5f60
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions OMEdit/OMEditGUI/OMC/OMCProxy.cpp
Expand Up @@ -315,7 +315,6 @@ static const char* stripbinpath(char *omhome)
#include <linux/limits.h>
#include <unistd.h>
QString linuxOMHome(void) {
struct stat sb;
char omhome[PATH_MAX];
ssize_t r;
/* This is bad code using hard-coded limits; but we cannot query the size of symlinks on /proc
Expand All @@ -326,7 +325,7 @@ QString linuxOMHome(void) {
perror("readlink");
exit(EXIT_FAILURE);
}
if (r < sizeof(omhome)-1) {
if (r < (long) sizeof(omhome) - 1) {
return CONFIG_DEFAULT_OPENMODELICAHOME;
}
omhome[r] = '\0';
Expand Down

0 comments on commit 25d5f60

Please sign in to comment.