Mercurial > dwindows
comparison gtk4/dw.c @ 2855:86286f528adf
Fix new safety warnings reported by the new GCC on Linux.
The semaphore code is used on other platforms... make sure
all platforms using this code are the same.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 15 Nov 2022 03:50:00 +0000 |
parents | 8a5131cbbe93 |
children | 59106bf7f9f4 |
comparison
equal
deleted
inserted
replaced
2854:8a5131cbbe93 | 2855:86286f528adf |
---|---|
7791 memcpy(newarray, &array[1], sizeof(struct _dw_seminfo)*(connectcount-1)); | 7791 memcpy(newarray, &array[1], sizeof(struct _dw_seminfo)*(connectcount-1)); |
7792 else | 7792 else |
7793 { | 7793 { |
7794 memcpy(newarray, array, sizeof(struct _dw_seminfo)*z); | 7794 memcpy(newarray, array, sizeof(struct _dw_seminfo)*z); |
7795 if(z!=(connectcount-1)) | 7795 if(z!=(connectcount-1)) |
7796 memcpy(&newarray[z], &array[z+1], sizeof(struct _dw_seminfo)*(z-connectcount-1)); | 7796 memcpy(&newarray[z], &array[z+1], sizeof(struct _dw_seminfo)*(connectcount-(z+1))); |
7797 } | 7797 } |
7798 connectcount--; | 7798 connectcount--; |
7799 | 7799 |
7800 /* Replace old array with new one */ | 7800 /* Replace old array with new one */ |
7801 free(array); | 7801 free(array); |