Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: webkit/tools/npapi_layout_test_plugin/PluginObject.cpp

Issue 27038: Fix more GCC 4.3 warnings. (Closed)
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« base/process_util_unittest.cc ('K') | « base/process_util_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 550
551 NPString pathString = NPVARIANT_TO_STRING(args[2]); 551 NPString pathString = NPVARIANT_TO_STRING(args[2]);
552 char* path = toCString(pathString); 552 char* path = toCString(pathString);
553 553
554 NPString contentsString = NPVARIANT_TO_STRING(args[3]); 554 NPString contentsString = NPVARIANT_TO_STRING(args[3]);
555 555
556 FILE* tempFile = fopen(path, "w"); 556 FILE* tempFile = fopen(path, "w");
557 if (!tempFile) 557 if (!tempFile)
558 return false; 558 return false;
559 559
560 fwrite(contentsString.UTF8Characters, contentsString.UTF8Length, 1, tempFile ); 560 int written = fwrite(contentsString.UTF8Characters, contentsString.UTF8Lengt h, 1, tempFile);
agl 2009/02/22 01:25:35 size_t, not int
561 DCHECK(written == 1);
561 fclose(tempFile); 562 fclose(tempFile);
562 563
563 NPError error = browser->posturl(obj->npp, url, target, pathString.UTF8Lengt h, path, TRUE); 564 NPError error = browser->posturl(obj->npp, url, target, pathString.UTF8Lengt h, path, TRUE);
564 565
565 free(path); 566 free(path);
566 free(target); 567 free(target);
567 free(url); 568 free(url);
568 569
569 BOOLEAN_TO_NPVARIANT(error == NPERR_NO_ERROR, *result); 570 BOOLEAN_TO_NPVARIANT(error == NPERR_NO_ERROR, *result);
570 return true; 571 return true;
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 object->firstUrl = strdup(url); 836 object->firstUrl = strdup(url);
836 if (headers) 837 if (headers)
837 object->firstHeaders = strdup(headers); 838 object->firstHeaders = strdup(headers);
838 } else { 839 } else {
839 free(object->lastUrl); 840 free(object->lastUrl);
840 free(object->lastHeaders); 841 free(object->lastHeaders);
841 object->lastUrl = (url ? strdup(url) : NULL); 842 object->lastUrl = (url ? strdup(url) : NULL);
842 object->lastHeaders = (headers ? strdup(headers) : NULL); 843 object->lastHeaders = (headers ? strdup(headers) : NULL);
843 } 844 }
844 } 845 }
OLDNEW
« base/process_util_unittest.cc ('K') | « base/process_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698