tizen 2.3.1 release
[framework/uifw/embryo.git] / src / bin / embryo_cc_sc3.c
index 3a060fb..b54e570 100644 (file)
@@ -18,7 +18,7 @@
  *      misrepresented as being the original software.
  *  3.  This notice may not be removed or altered from any source distribution.
  *
- *  Version: $Id: embryo_cc_sc3.c 51023 2010-08-11 20:35:26Z lucas $
+ *  Version: $Id$
  */
 
 
@@ -166,11 +166,12 @@ check_userop(void   (*oper) (void), int tag1, int tag2, int numparam,
          {
             assert((sizeof binoperstr / sizeof binoperstr[0]) ==
                    (sizeof op1 / sizeof op1[0]));
-            for (i = 0; i < sizeof op1 / sizeof op1[0]; i++)
+            for (i = 0; i < (int)(sizeof op1 / sizeof op1[0]); i++)
               {
                  if (oper == op1[i])
                    {
-                      strcpy(opername, binoperstr[i]);
+                      strncpy(opername, binoperstr[i], sizeof(opername) - 1);
+                      opername[sizeof(opername) - 1] = 0;
                       savepri = binoper_savepri[i];
                       break;
                    }           /* if */
@@ -186,11 +187,12 @@ check_userop(void   (*oper) (void), int tag1, int tag2, int numparam,
               (sizeof unopers / sizeof unopers[0]));
        if (opername[0] == '\0')
          {
-            for (i = 0; i < sizeof unopers / sizeof unopers[0]; i++)
+            for (i = 0; i < (int)(sizeof unopers / sizeof unopers[0]); i++)
               {
                  if (oper == unopers[i])
                    {
-                      strcpy(opername, unoperstr[i]);
+                      strncpy(opername, unoperstr[i], sizeof(opername) - 1);
+                      opername[sizeof(opername) - 1] = 0;
                       break;
                    }           /* if */
               }                /* for */
@@ -221,7 +223,7 @@ check_userop(void   (*oper) (void), int tag1, int tag2, int numparam,
           return FALSE;
      }                         /* if */
 
-   /* check existance and the proper declaration of this function */
+   /* check existence and the proper declaration of this function */
    if ((sym->usage & uMISSING) != 0 || (sym->usage & uPROTOTYPED) == 0)
      {
        char                symname[2 * sNAMEMAX + 16]; /* allow space for user defined operators */
@@ -266,7 +268,7 @@ check_userop(void   (*oper) (void), int tag1, int tag2, int numparam,
    else if (savealt)
      {
        /* for the assignment operator, ALT may contain an address at which the
-        * result must be stored; this address must be preserved accross the
+        * result must be stored; this address must be preserved across the
         * call
         */
        assert(lval != NULL);   /* this was checked earlier */
@@ -820,7 +822,7 @@ array_levelsize(symbol * sym, int level)
  *
  *  Lowest hierarchy level (except for the , operator).
  *
- *  Global references: intest   (reffered to only)
+ *  Global references: intest   (referred to only)
  */
 int
 hier14(value * lval1)
@@ -1300,7 +1302,7 @@ hier2(value * lval)
        if (sym && sym->ident != iFUNCTN && sym->ident != iREFFUNC
            && (sym->usage & uDEFINE) == 0)
           sym = NULL;          /* symbol is not a function, it is in the table, but not "defined" */
-       val = (sym != NULL);
+       val = !!sym;
        if (!val && find_subst(st, strlen(st)))
           val = 1;
        clear_value(lval);