home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lclint.zip / lclint-2_3h-os2-bin.zip / test / sharing.expect < prev    next >
Text File  |  1997-09-03  |  8KB  |  161 lines

  1.  
  2. sharing1.c: (in function f)
  3. sharing1.c:12,12: Only storage x not released before return
  4.    sharing1.c:8,24: Storage x becomes only
  5. sharing1.c:13,2: Only storage x not released before return
  6.    sharing1.c:8,24: Storage x becomes only
  7. sharing1.c: (in function f2)
  8. sharing1.c:19,12: Only storage y not released before return
  9.    sharing1.c:15,43: Storage y becomes only
  10. sharing1.c: (in function f3)
  11. sharing1.c:24,3: Only storage x assigned to shared: globshared1 = x
  12.    sharing1.c:22,25: Storage x becomes only
  13. sharing1.c:25,2: Only storage x not released before return
  14.    sharing1.c:22,25: Storage x becomes only
  15. sharing1.c: (in function f4)
  16. sharing1.c:29,3: Only storage zonly not released before assignment: zonly = x
  17.    sharing1.c:6,19: Storage zonly becomes only
  18. sharing1.c: (in function g)
  19. sharing1.c:41,7: Implicitly temp storage imp passed as only param: f3 (imp)
  20. sharing1.c:42,4: Variable imp used after being released
  21.    sharing1.c:41,7: Storage imp released
  22. sharing1.c:44,12: Immediate address &x passed as only param: f (&x, ...)
  23. sharing1.c:44,12: Parameter 1 (&x) to function f is declared only but is
  24.                      aliased by parameter 2 (&x)
  25. sharing1.c:48,14: Possibly null storage y3 passed as non-null param:
  26.                      f2 (y3, ...)
  27.    sharing1.c:37,13: Storage y3 may become null
  28. sharing1.c:48,14: Passed storage y3 not completely defined (*y3 is undefined):
  29.                      f2 (y3, ...)
  30. sharing1.c:48,18: Possibly null storage y3 passed as non-null param:
  31.                      f2 (..., y3)
  32.    sharing1.c:37,13: Storage y3 may become null
  33. sharing1.c:48,18: Parameter 2 (y3) to function f2 is declared only but is
  34.                      aliased by parameter 1 (y3)
  35. sharing1.c:50,4: Variable y3 used after being released
  36.    sharing1.c:48,18: Storage y3 released
  37. sharing1.c:50,4: Dereference of possibly null pointer y3: *y3
  38.    sharing1.c:37,13: Storage y3 may become null
  39. sharing1.c:51,12: Possibly null storage y passed as non-null param: f (y, ...)
  40.    sharing1.c:35,12: Storage y may become null
  41. sharing1.c:51,12: Passed storage y not completely defined (*y is undefined):
  42.                      f (y, ...)
  43. sharing1.c:52,12: Shared storage globshared1 passed as only param:
  44.                      f (globshared1, ...)
  45.    sharing1.c:4,19: Storage globshared1 becomes shared
  46. sharing1.c:56,9: Shared storage globshared2 passed as only param:
  47.                     free (globshared2)
  48.    sharing1.c:5,19: Storage globshared2 becomes shared
  49. sharing1.c:59,11: Variable y used after being released
  50.    sharing1.c:51,12: Storage y released
  51. sharing1.c:59,11: Dereference of possibly null pointer y: *y
  52.    sharing1.c:35,12: Storage y may become null
  53. sharing1.c:59,13: Fresh storage y2 not released before return
  54.    sharing1.c:36,33: Fresh storage y2 allocated
  55. sharing1.c:59,13: Function returns with global globonly referencing released
  56.                      storage
  57.    sharing1.c:57,9: Storage globonly is released
  58.  
  59. Finished LCLint checking --- 24 code errors found, as expected
  60.  
  61. sharing3.c: (in function string_copy)
  62. sharing3.c:17,10: Implicitly temp storage s returned as only: s
  63. sharing3.c: (in function string_free1)
  64. sharing3.c:32,9: Implicitly temp storage s passed as only param: free (s)
  65. sharing3.c: (in function string_free3)
  66. sharing3.c:45,2: Fresh storage t not released before return
  67.    sharing3.c:42,29: Fresh storage t allocated
  68.  
  69. Finished LCLint checking --- 3 code errors found, as expected
  70.  
  71. sharing4.c: (in function f)
  72. sharing4.c:18,3: Only storage globonly1 not released before assignment:
  73.                     globonly1 = only1
  74.    sharing4.c:1,20: Storage globonly1 becomes only
  75. sharing4.c:23,3: Only storage globonly4 not released before assignment:
  76.                     globonly4 = shared1
  77.    sharing4.c:4,20: Storage globonly4 becomes only
  78. sharing4.c:23,3: Shared storage shared1 assigned to only: globonly4 = shared1
  79.    sharing4.c:14,26: Storage shared1 becomes shared
  80. sharing4.c:27,3: Only storage globonly5 assigned to shared:
  81.                     globshared1 = globonly5
  82.    sharing4.c:5,20: Storage globonly5 becomes only
  83. sharing4.c:30,3: Only storage globonly1 assigned to shared (local1 aliases
  84.                     globonly1): globshared1 = local1
  85.    sharing4.c:1,20: Storage globonly1 becomes only
  86. sharing4.c:30,3: Kept storage only1 assigned to shared (local1 aliases only1):
  87.                     globshared1 = local1
  88.    sharing4.c:18,3: Storage only1 becomes kept
  89. sharing4.c:32,3: Only storage assigned to shared:
  90.                     globshared1 = string_copy(local1)
  91. sharing4.c:34,3: Temp storage temp2 assigned to shared: globshared2 = temp2
  92.    sharing4.c:13,37: Storage temp2 becomes temp
  93. sharing4.c:35,3: Only storage globonly4 not released before assignment:
  94.                     globonly4 = temp1
  95.    sharing4.c:4,20: Storage globonly4 becomes only
  96. sharing4.c:35,3: Implicitly temp storage temp1 assigned to only:
  97.                     globonly4 = temp1
  98. sharing4.c:38,9: Shared storage shared1 passed as only param: free (shared1)
  99.    sharing4.c:14,26: Storage shared1 becomes shared
  100. sharing4.c:42,12: Only storage only3 not released before return
  101.    sharing4.c:12,72: Storage only3 becomes only
  102. sharing4.c:42,12: Function returns with global globonly3 referencing released
  103.                      storage
  104.    sharing4.c:21,9: Storage globonly3 is released
  105.  
  106. Finished LCLint checking --- 13 code errors found, as expected
  107.  
  108. sharing4.c: (in function f)
  109. sharing4.c:18,3: Only storage globonly1 not released before assignment:
  110.                     globonly1 = only1
  111.    sharing4.c:1,20: Storage globonly1 becomes only
  112. sharing4.c:23,3: Only storage globonly4 not released before assignment:
  113.                     globonly4 = shared1
  114.    sharing4.c:4,20: Storage globonly4 becomes only
  115. sharing4.c:23,3: Shared storage shared1 assigned to only: globonly4 = shared1
  116.    sharing4.c:14,26: Storage shared1 becomes shared
  117. sharing4.c:27,3: Only storage globonly5 assigned to shared:
  118.                     globshared1 = globonly5
  119.    sharing4.c:5,20: Storage globonly5 becomes only
  120. sharing4.c:30,3: Only storage globonly1 assigned to shared (local1 aliases
  121.                     globonly1): globshared1 = local1
  122.    sharing4.c:1,20: Storage globonly1 becomes only
  123. sharing4.c:30,3: Kept storage only1 assigned to shared (local1 aliases only1):
  124.                     globshared1 = local1
  125.    sharing4.c:18,3: Storage only1 becomes kept
  126. sharing4.c:32,3: Only storage assigned to shared:
  127.                     globshared1 = string_copy(local1)
  128. sharing4.c:34,3: Temp storage temp2 assigned to shared: globshared2 = temp2
  129.    sharing4.c:13,37: Storage temp2 becomes temp
  130. sharing4.c:35,3: Only storage globonly4 not released before assignment:
  131.                     globonly4 = temp1
  132.    sharing4.c:4,20: Storage globonly4 becomes only
  133. sharing4.c:38,9: Shared storage shared1 passed as only param: free (shared1)
  134.    sharing4.c:14,26: Storage shared1 becomes shared
  135. sharing4.c:42,12: Only storage only3 not released before return
  136.    sharing4.c:12,72: Storage only3 becomes only
  137. sharing4.c:42,12: Function returns with global globonly3 referencing released
  138.                      storage
  139.    sharing4.c:21,9: Storage globonly3 is released
  140.  
  141. Finished LCLint checking --- 12 code errors found, expected 11
  142.  
  143. sharing5.c: (in function f)
  144. sharing5.c:13,4: Variable only1 used after being released
  145.    sharing5.c:12,9: Storage only1 released
  146. sharing5.c:22,5: Clauses exit with local2 referencing local storage in true
  147.                     branch, shared storage in false branch
  148.    sharing5.c:21,7: Storage local2 becomes shared
  149. sharing5.c:24,9: Shared storage shared passed as only param (local2 aliases
  150.                     shared): free (local2)
  151.    sharing5.c:5,27: Storage shared becomes shared
  152. sharing5.c:27,4: Dereference of possibly null pointer localp: *localp
  153.    sharing5.c:26,12: Storage localp may become null
  154. sharing5.c:32,3: Fresh storage localp not released before assignment:
  155.                     localp = &only3
  156.    sharing5.c:26,3: Fresh storage localp allocated
  157. sharing5.c:33,2: Only storage only3 not released before return
  158.    sharing5.c:4,73: Storage only3 becomes only
  159.  
  160. Finished LCLint checking --- 6 code errors found, as expected
  161.